unique-slug
Generate a unique character string suitible for use in files and URLs.
Last updated 7 months ago by GitHub Actions .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ npm install unique-slug 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 7.0.0                                ...           latest (7 months ago)

9 Versions

  • 7.0.0                                ...           7 months ago
  • 6.0.0                                ...           a year ago
  • 5.0.0                                ...           2 years ago
  • 4.0.0                                ...           4 years ago
  • 3.0.0                                ...           4 years ago
  • 2.0.2                                ...           7 years ago
  • 2.0.1                                ...           8 years ago
  • 2.0.0                                ...           11 years ago
  • 1.0.0                                ...           12 years ago
Downloads
Total 27
Today 0
This Week 1
This Month 15
Last Day 0
Last Week 8
Last Month 9
Dependencies (1)
Dev Dependencies (2)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE