Emmanuil c2e0590820 31.07.2020 4 år sedan
..
index.d.ts c2e0590820 31.07.2020 4 år sedan
index.js c2e0590820 31.07.2020 4 år sedan
license c2e0590820 31.07.2020 4 år sedan
package.json c2e0590820 31.07.2020 4 år sedan
readme.md c2e0590820 31.07.2020 4 år sedan

readme.md

crypto-random-string Build Status

Generate a cryptographically strong random string

Can be useful for creating an identifier, slug, salt, fixture, etc.

Install

$ npm install crypto-random-string

Usage

const cryptoRandomString = require('crypto-random-string');

cryptoRandomString(10);
//=> '2cf05d94db'

API

cryptoRandomString(length)

Returns a hex string.

length

Type: number

Length of the returned string.

Related

License

MIT © Sindre Sorhus