Name: unique-slug
Owner: npm
Description: Generate a unique character string suitible for use in files and URLs.
Created: 2015-05-07 22:25:03.0
Updated: 2018-05-18 15:55:10.0
Pushed: 2016-08-01 13:00:37.0
Homepage: null
Size: 5
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Generate a unique character string suitible for use in files and URLs.
uniqueSlug = require('unique-slug')
randomSlug = uniqueSlug()
fileSlug = uniqueSlug('/etc/passwd')
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
.