1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-09-20 04:31:56 +00:00
musix-oss/node_modules/crypto-random-string
2020-03-03 22:30:50 +02:00
..
index.d.ts Modules 2020-03-03 22:30:50 +02:00
index.js Modules 2020-03-03 22:30:50 +02:00
license Modules 2020-03-03 22:30:50 +02:00
package.json Modules 2020-03-03 22:30:50 +02:00
readme.md Modules 2020-03-03 22:30:50 +02:00

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.

License

MIT © Sindre Sorhus