You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Nikola Ignjatovic d724149647 Init commit 3 years ago
..
index.d.ts Init commit 3 years ago
index.js Init commit 3 years ago
license Init commit 3 years ago
package.json Init commit 3 years ago
readme.md Init commit 3 years ago

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.

License

MIT © Sindre Sorhus