hyphenslug

1.0.0 • Public • Published

hyphenslug

npm-version

Opinionated Node.js function that returns a slug made only of lowercase letters, numbers and hyphens, from any string.

const hyphenslug = require('hyphenslug')
 
hyphenslug('I just want a simple URL slug!') // i-just-want-a-simple-url-slug
hyphenslug('unicode ♥ is ☢') // unicode-love-is-radioactive

Inspired by slug and slugify.

Might be too big to be used in the browser, since it relies on the unicode package.

Package Sidebar

Install

npm i hyphenslug

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

8.47 kB

Total Files

3

Last publish

Collaborators

  • antoine129