node/deps/npm/node_modules/unique-filename/node_modules/unique-slug
Rebecca Turner 76cb81b354 deps: upgrade npm to 3.6.0
PR-URL: https://github.com/nodejs/node/pull/4958
Reviewed-By: Myles Borins <mborins@us.ibm.com>
Reviewed-By: Kat Marchán <kzm@sykosomatic.org>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-02-01 10:43:34 -05:00
..
test deps: upgrade npm to 3.6.0 2016-02-01 10:43:34 -05:00
.npmignore deps: upgrade npm to 3.6.0 2016-02-01 10:43:34 -05:00
.travis.yml deps: upgrade npm to 3.6.0 2016-02-01 10:43:34 -05:00
index.js deps: upgrade npm to 3.6.0 2016-02-01 10:43:34 -05:00
package.json deps: upgrade npm to 3.6.0 2016-02-01 10:43:34 -05:00
README.md deps: upgrade npm to 3.6.0 2016-02-01 10:43:34 -05:00

unique-slug

Generate a unique character string suitible for use in files and URLs.

var uniqueSlug = require('unique-slug')

var randomSlug = uniqueSlug()
var fileSlug = uniqueSlug('/etc/passwd')

uniqueSlug(str) → String (8 chars)

If str is passed in then the return value will be its murmur hash in hex.

If str is not passed in, it will be 4 bytes coverted into 8 hex characters, generated by crypto.pseudoRandomBytes.