r3-v2/node_modules/unique-slug
Theunis J. Botha 5f5bbac56e initial comit 2020-02-27 15:24:35 +01:00
..
test initial comit 2020-02-27 15:24:35 +01:00
.travis.yml initial comit 2020-02-27 15:24:35 +01:00
LICENSE initial comit 2020-02-27 15:24:35 +01:00
README.md initial comit 2020-02-27 15:24:35 +01:00
index.js initial comit 2020-02-27 15:24:35 +01:00
package.json initial comit 2020-02-27 15:24:35 +01:00

README.md

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 randomly generated bytes converted into 8 hexadecimal characters.