node/deps/npm/node_modules/unique-filename/node_modules/unique-slug
Kat Marchán d44a9eb11b deps: upgrade npm to 3.10.8
PR-URL: https://github.com/nodejs/node/pull/8706
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-09-27 16:39:27 -04: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.10.8 2016-09-27 16:39:27 -04: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.