sonia-js/node_modules/crypto-random-string
2024-07-20 14:47:23 -06:00
..
index.d.ts init 2023-03-30 09:45:31 +00:00
index.js init 2023-03-30 09:45:31 +00:00
license init 2023-03-30 09:45:31 +00:00
package.json a 2024-07-20 14:47:23 -06:00
readme.md init 2023-03-30 09:45:31 +00: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