unique-slug
Generate a unique character string suitible for use in files and URLs.
Last updated 9 years ago by othiym23 .
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 1
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (2)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |