Skip to content

mjasnikovs/random-txt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

random-txt

Generate URL safe random string from numeric value

Features:

  • generate url safe random string from numeric value
  • numeric salt
  • default generation from time stamp
  • With 3 number salt, generated strings have 10 millions (+/- 1) unique values (see test.js)
  • Not totally random generation, random-txt uses pattern and randomness to ensure most unique result
  • No dependencies
  • ES6

Install

$ npm install random-txt

How to use

const randomTxt = require('random-txt')
const salt = 867
const randomNumber = new Date().valueOf()

console.log(randomTxt())
console.log(randomTxt(salt))
console.log(randomTxt(salt, randomNumber))

// GsXvQ5
// zXTljizg
// YFJmWXck

License

MIT

About

Generate URL safe random string from numeric value

Resources

License

Stars

Watchers

Forks

Packages

No packages published