Sha256: 5c9375873041273bf031b9362b51e58216cc6478da5cb68b496446d9a51a3076
Contents?: true
Size: 459 Bytes
Versions: 11
Compression:
Stored size: 459 Bytes
Contents
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`.
Version data entries
11 entries across 10 versions & 5 rubygems