Skip to content

Latest commit

 

History

History
16 lines (10 loc) · 669 Bytes

README.md

File metadata and controls

16 lines (10 loc) · 669 Bytes

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.