Questionnaire-of-the-Facebo.../node_modules/crypto-random-string
2021-03-10 20:43:28 -05:00
..
index.d.ts Updated the Survey. 2021-03-10 20:43:28 -05:00
index.js Updated the Survey. 2021-03-10 20:43:28 -05:00
license Updated the Survey. 2021-03-10 20:43:28 -05:00
package.json Updated the Survey. 2021-03-10 20:43:28 -05:00
readme.md Updated the Survey. 2021-03-10 20:43:28 -05: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