unique-slug

5.0.0last stable release 4 months ago
Complexity Score
Low
Open Issues
N/A
Dependent Projects
232
Weekly Downloadsglobal
19,956,986

Keywords

License

  • ISC
    • Yesattribution
    • Permissivelinking
    • Permissivedistribution
    • Permissivemodification
    • Nopatent grant
    • Yesprivate use
    • Permissivesublicensing
    • Notrademark grant

Downloads

Readme

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.

Dependencies

CVE IssuesActive
0
Scorecards Score
6.10
Test Coverage
No Data
Follows Semver
Yes
Github Stars
33
Dependenciestotal
4
DependenciesOutdated
2
DependenciesDeprecated
0
Threat Modelling
No Data
Repo Audits
No Data

Learn how to distribute unique-slug in your own private NPM registry

npm config set registry  https://npm.cloudsmith.com/owner/repo
Processing...
Done
npm install unique-slug
Processing...
Done

7 Releases

NPM on Cloudsmith

Getting started with NPM on Cloudsmith is fast and easy.