rndm
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/rndm package

1.2.0 • Public • Published

RNDM

Random string generator. Basically Math.random().toString(36).slice(2), but with both upper and lower case letters and arbitrary lengths. Useful for creating fast, not cryptographically secure salts.

API

// base62 by default
var rndm = require('rndm')
var salt = rndm(16)

var salt = rndm(length)

var salt = rndm.base62(length)

var salt = rndm.base36(length)

var salt = rndm.base10(length)

var random = rndm.create(characters)

Create a new random generator with custom characters.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.2.0583,679latest

Version History

VersionDownloads (Last 7 Days)Published
1.2.0583,679
1.1.1486
1.1.050
1.0.073

Package Sidebar

Install

npm i rndm

Weekly Downloads

584,288

Version

1.2.0

License

MIT

Last publish

Collaborators

  • coderhaoxin
  • jongleberry
  • dougwilson
  • fishrock123