chrisdrakeford 9c87c1307d first commit %!s(int64=3) %!d(string=hai) anos
..
index.d.ts 9c87c1307d first commit %!s(int64=3) %!d(string=hai) anos
index.js 9c87c1307d first commit %!s(int64=3) %!d(string=hai) anos
license 9c87c1307d first commit %!s(int64=3) %!d(string=hai) anos
package.json 9c87c1307d first commit %!s(int64=3) %!d(string=hai) anos
readme.md 9c87c1307d first commit %!s(int64=3) %!d(string=hai) anos

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