mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-12-27 18:09:08 +00:00
.. | ||
index.js | ||
license | ||
package.json | ||
readme.md |
crypto-random-string
Generate a cryptographically strong random string
Can be useful for creating an identifier, slug, salt, fixture, etc.
Install
$ npm install --save crypto-random-string
Usage
const cryptoRandomString = require('crypto-random-string');
cryptoRandomString(10);
//=> '2cf05d94db'
API
cryptoRandomString(length)
length
Type: number
Length of the returned string.
Related
- random-int - Generate a random integer
- random-float - Generate a random float
- random-item - Get a random item from an array
- random-boolean - Get a random boolean
- random-obj-key - Get a random key from an object
- random-obj-prop - Get a random property from an object
- unique-random - Generate random numbers that are consecutively unique
License
MIT © Sindre Sorhus