slugy
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

🌐 Slugy

Easily slugify url & titles from any ordinary string.

code style: prettier npm version Dependencies npm downloads package phobia bundle phobia

Installation

Using yarn:

yarn add slugy

Using npm:

npm i slugy

Usage

import { slugy } from 'slugy';
 
const slug = await slugy('Hello World'); // hello-world
 
// With options:
const slug = await slugy('Hello World', { separator: '_', lower: false }); // Hello_World
 
// Turning off Unidecode
const slug = slugy('\u1515\u14c7\u14c7', { unidecode: false }); // ᔕᓇᓇ

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    9
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.0
    9
  • 1.0.2
    6
  • 1.0.1
    2

Package Sidebar

Install

npm i slugy

Weekly Downloads

17

Version

1.1.0

License

MIT

Unpacked Size

5.2 kB

Total Files

5

Last publish

Collaborators

  • gomah