source: frontend/node_modules/crypto-random-string/readme.md@ cdcff72

Last change on this file since cdcff72 was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 1.4 KB
Line 
1# crypto-random-string [![Build Status](https://travis-ci.org/sindresorhus/crypto-random-string.svg?branch=master)](https://travis-ci.org/sindresorhus/crypto-random-string)
2
3> Generate a [cryptographically strong](https://en.m.wikipedia.org/wiki/Strong_cryptography) random string
4
5Can be useful for creating an identifier, slug, salt, fixture, etc.
6
7
8## Install
9
10```
11$ npm install crypto-random-string
12```
13
14
15## Usage
16
17```js
18const cryptoRandomString = require('crypto-random-string');
19
20cryptoRandomString(10);
21//=> '2cf05d94db'
22```
23
24
25## API
26
27### cryptoRandomString(length)
28
29Returns a [`hex`](https://en.wikipedia.org/wiki/Hexadecimal) string.
30
31#### length
32
33Type: `number`
34
35Length of the returned string.
36
37
38## Related
39
40- [random-int](https://github.com/sindresorhus/random-int) - Generate a random integer
41- [random-float](https://github.com/sindresorhus/random-float) - Generate a random float
42- [random-item](https://github.com/sindresorhus/random-item) - Get a random item from an array
43- [random-boolean](https://github.com/arthurvr/random-boolean) - Get a random boolean
44- [random-obj-key](https://github.com/sindresorhus/random-obj-key) - Get a random key from an object
45- [random-obj-prop](https://github.com/sindresorhus/random-obj-prop) - Get a random property from an object
46- [unique-random](https://github.com/sindresorhus/unique-random) - Generate random numbers that are consecutively unique
47
48
49## License
50
51MIT © [Sindre Sorhus](https://sindresorhus.com)
Note: See TracBrowser for help on using the repository browser.