unique-slug
Generate a unique character string suitible for use in files and URLs.
Last updated 2 years ago by lukekarrys .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm 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

  • 4.0.0                                ...           latest (2 years ago)

6 Versions

  • 4.0.0                                ...           2 years ago
  • 3.0.0                                ...           2 years ago
  • 2.0.2                                ...           6 years ago
  • 2.0.1                                ...           6 years ago
  • 2.0.0                                ...           9 years ago
  • 1.0.0                                ...           10 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (3)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |