diff options
Diffstat (limited to 'node_modules/randomatic/README.md')
-rw-r--r-- | node_modules/randomatic/README.md | 48 |
1 files changed, 34 insertions, 14 deletions
diff --git a/node_modules/randomatic/README.md b/node_modules/randomatic/README.md index 14485ffa2..5bcc2e1b2 100644 --- a/node_modules/randomatic/README.md +++ b/node_modules/randomatic/README.md @@ -1,6 +1,8 @@ # randomatic [](https://www.npmjs.com/package/randomatic) [](https://npmjs.org/package/randomatic) [](https://npmjs.org/package/randomatic) [](https://travis-ci.org/jonschlinkert/randomatic) -> Generate randomized strings of a specified length, fast. Only the length is necessary, but you can optionally generate patterns using any combination of numeric, alpha-numeric, alphabetical, special or custom characters. +> Generate randomized strings of a specified length using simple character sequences. The original generate-password. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. ## Install @@ -20,10 +22,13 @@ var randomize = require('randomatic'); ```js randomize(pattern, length, options); +randomize.isCrypto; ``` -* `pattern` **{String}**: The pattern to use for randomizing -* `length` **{Object}**: The length of the string to generate +* `pattern` **{String}**: (required) The pattern to use for randomizing +* `length` **{Number}**: (optional) The length of the string to generate +* `options` **{Object}**: (optional) See available [options](#options) +* `randomize.isCrypto` will be `true` when a cryptographically secure function is being used to generate random numbers. The value will be `false` when the function in use is `Math.random`. ### pattern @@ -37,10 +42,10 @@ To generate a 10-character randomized string using all available characters: ```js randomize('*', 10); -//=> +//=> 'x2_^-5_T[$' randomize('Aa0!', 10); -//=> +//=> 'LV3u~BSGhw' ``` * `a`: Lowercase alpha characters (`abcdefghijklmnopqrstuvwxyz'`) @@ -84,6 +89,18 @@ Define a custom string to be randomized. * `randomize('?', 20, {chars: 'jonschlinkert'})` will generate a 20-character randomized string from the letters contained in `jonschlinkert`. * `randomize('?', {chars: 'jonschlinkert'})` will generate a 13-character randomized string from the letters contained in `jonschlinkert`. +#### exclude + +Type: `String|Array` + +Default: `undefined` + +Specify a string or array of characters can are excluded from the possible characters used to generate the randomized string. + +**Example:** + +* `randomize('*', 20, { exclude: '0oOiIlL1' })` will generate a 20-character randomized string using all of possible characters except for `0oOiIlL1`. + ## Usage Examples * `randomize('A', 4)` (_whitespace insenstive_) would result in randomized 4-digit uppercase letters, like, `ZAKH`, `UJSL`... etc. @@ -111,13 +128,16 @@ Pull requests and stars are always welcome. For bugs and feature requests, [plea ### Contributors -| **Commits** | **Contributor** | -| --- | --- | -| 41 | [jonschlinkert](https://github.com/jonschlinkert) | -| 1 | [TrySound](https://github.com/TrySound) | -| 1 | [Drag0s](https://github.com/Drag0s) | -| 1 | [paulmillr](https://github.com/paulmillr) | -| 1 | [sunknudsen](https://github.com/sunknudsen) | +| **Commits** | **Contributor** | +| --- | --- | +| 56 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [realityking](https://github.com/realityking) | +| 1 | [TrySound](https://github.com/TrySound) | +| 1 | [Drag0s](https://github.com/Drag0s) | +| 1 | [paulmillr](https://github.com/paulmillr) | +| 1 | [sunknudsen](https://github.com/sunknudsen) | +| 1 | [faizulhaque-tp](https://github.com/faizulhaque-tp) | +| 1 | [michaelrhodes](https://github.com/michaelrhodes) | ### Building docs @@ -146,9 +166,9 @@ $ npm install && npm test ### License -Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). Released under the [MIT License](LICENSE). *** -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 09, 2017._
\ No newline at end of file +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.7.0, on August 08, 2018._
\ No newline at end of file |