{"name":"randomatic","description":"Generate randomized strings of a specified length using simple character sequences. The original generate-password.","version":"3.1.0","homepage":"https://github.com/jonschlinkert/randomatic","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"contributors":[{"name":"Bogdan Chadkin","url":"https://github.com/TrySound"},{"name":"Dragos Fotescu","url":"http://dragosfotescu.com"},{"name":"Faiz ul haque","url":"http://www.10pearls.com"},{"name":"Jon Schlinkert","url":"http://twitter.com/jonschlinkert"},{"name":"Michael Rhodes","url":"http://michaelrhod.es"},{"name":"Paul Miller","url":"https://paulmillr.com"},{"name":"Rouven Weßling","url":"www.rouvenwessling.de"},{"name":"Sun Knudsen","url":"https://sunknudsen.com"}],"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/randomatic.git"},"bugs":{"url":"https://github.com/jonschlinkert/randomatic/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">= 0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"is-number":"^4.0.0","kind-of":"^6.0.0","math-random":"^1.0.1"},"devDependencies":{"ansi-bold":"^0.1.1","benchmarked":"^1.1.1","glob":"^7.1.2","gulp-format-md":"^0.1.12","mocha":"^3.4.2"},"keywords":["alpha","alpha-numeric","alphanumeric","characters","chars","generate","generate-password","numeric","password","rand","random","randomatic","randomize","randomized"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["pad-left","pad-right","repeat-string"]},"lint":{"reflinks":true}},"gitHead":"4d76cd1ec91d0ac0ff33fa112efb806ab96295b9","_id":"randomatic@3.1.0","_npmVersion":"6.1.0","_nodeVersion":"10.3.0","_npmUser":{"name":"doowb","email":"brian.woodward@gmail.com"},"dist":{"integrity":"sha512-KnGPVE0lo2WoXxIZ7cPR8YBpiol4gsSuOwDSg410oHh80ZMp5EiypNqL2K4Z77vJn6lB5rap7IkAmcUlalcnBQ==","shasum":"36f2ca708e9e567f5ed2ec01949026d50aa10116","tarball":"http://registry-npm.ywwl.com/randomatic/download/randomatic-3.1.0.tgz","fileCount":4,"unpackedSize":12421,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJba1MKCRA9TVsSAnZWagAAYYsQAKAsbfsYPVlzalCQIzCf\nk71tleOZRGBSfuzJW+Wa9AZLFczC9nNex3nsdBKMr3wdCRSCti2448xzW5v8\nYgkKPzWzBLCMdLiTmfpE12GjUDld5KZ1KGN1RwFHU/AMNB8Du9NZn/y0/bQ8\nl9EKidQJrViSpCRFu/8KIRzZL5IQZ4GBE4hRTu0hlCJP0GdL29nBrTCvzdKX\nTaSZzbQCOXdpTObUuh9CeeiljjDU0Kp06uVboBy370nUJ/sRcUv1KzvV5HQl\nKZ7r54+jBVhvQHd+19SWkE9SV96O/ZUjMCgdJ4sHHkmVso6FEWHp0FxUldl1\n4+0H87R1Jfzi82CXzwQ90sC/X2tztBNUGhVgMn6G1nwkCU4/VBBGrpf0ULHB\nc/YSKRf41BgGFpKJ4NhCLrwdpx1GvDsRJAzG79mtpJT1s+mfJdspGjL9tE2+\nXJxVWHeEQtOtzYM21pIeX3W3pxbIkIjaQzwcrdgOuIYptduvGRqKlxcGl/wz\np5g/1veEQGGlGPPI3x1RPmGEGOr6hCDI/uyfoqfx5dtp5vWm0QkvVAPTUezw\nl209i9j0+G21jONJQo7Ue+TskYmLg4Ca3T/8MB2/lhsabrocpgymwzVCvj5f\nF8Vwq0vvaOYsZNiZ2Ki6tJcIIZtaGu/vR8zxsf/jx9hsBBP7bsZm6ySgVrmb\ngw0z\r\n=pcsN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHoKLkze8sWE5SGEHEFNDJJbbRhUgZWA1FBIfk8uPJW2AiBSiVSgBaNKZyc9/1im+AzGl08FPADGFkoIaP6wWr6fkg=="}],"size":4551,"noattachment":false,"key":"/randomatic/-/randomatic-3.1.0.tgz"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/randomatic_3.1.0_1533760266184_0.346632692147973"},"_hasShrinkwrap":false,"readme":"# randomatic [![NPM version](https://img.shields.io/npm/v/randomatic.svg?style=flat)](https://www.npmjs.com/package/randomatic) [![NPM monthly downloads](https://img.shields.io/npm/dm/randomatic.svg?style=flat)](https://npmjs.org/package/randomatic) [![NPM total downloads](https://img.shields.io/npm/dt/randomatic.svg?style=flat)](https://npmjs.org/package/randomatic) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/randomatic.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/randomatic)\n\n> Generate randomized strings of a specified length using simple character sequences. The original generate-password.\n\nPlease consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save randomatic\n```\n\n## Usage\n\n```js\nvar randomize = require('randomatic');\n```\n\n## API\n\n```js\nrandomize(pattern, length, options);\nrandomize.isCrypto;\n```\n\n* `pattern` **{String}**: (required) The pattern to use for randomizing\n* `length` **{Number}**: (optional) The length of the string to generate\n* `options` **{Object}**: (optional) See available [options](#options)\n* `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`.\n\n### pattern\n\n> The pattern to use for randomizing\n\nPatterns can contain any combination of the below characters, specified in any order.\n\n**Example:**\n\nTo generate a 10-character randomized string using all available characters:\n\n```js\nrandomize('*', 10);\n//=> 'x2_^-5_T[$'\n\nrandomize('Aa0!', 10);\n//=> 'LV3u~BSGhw'\n```\n\n* `a`: Lowercase alpha characters (`abcdefghijklmnopqrstuvwxyz'`)\n* `A`: Uppercase alpha characters (`ABCDEFGHIJKLMNOPQRSTUVWXYZ'`)\n* `0`: Numeric characters (`0123456789'`)\n* `!`: Special characters (`~!@#$%^&()_+-={}[];\\',.`)\n* `*`: All characters (all of the above combined)\n* `?`: Custom characters (pass a string of custom characters to the options)\n\n### length\n\n> The length of the string to generate\n\n**Examples:**\n\n* `randomize('A', 5)` will generate a 5-character, uppercase, alphabetical, randomized string, e.g. `KDJWJ`.\n* `randomize('0', 2)` will generate a 2-digit random number\n* `randomize('0', 3)` will generate a 3-digit random number\n* `randomize('0', 12)` will generate a 12-digit random number\n* `randomize('A0', 16)` will generate a 16-character, alpha-numeric randomized string\n\nIf `length` is left undefined, the length of the pattern in the first parameter will be used. For example:\n\n* `randomize('00')` will generate a 2-digit random number\n* `randomize('000')` will generate a 3-digit random number\n* `randomize('0000')` will generate a 4-digit random number...\n* `randomize('AAAAA')` will generate a 5-character, uppercase alphabetical random string...\n\nThese are just examples, [see the tests](./test.js) for more use cases and examples.\n\n## options\n\n> These are options that can be passed as the third argument.\n\n#### chars\n\nType: `String`\n\nDefault: `undefined`\n\nDefine a custom string to be randomized.\n\n**Example:**\n\n* `randomize('?', 20, {chars: 'jonschlinkert'})` will generate a 20-character randomized string from the letters contained in `jonschlinkert`.\n* `randomize('?', {chars: 'jonschlinkert'})` will generate a 13-character randomized string from the letters contained in `jonschlinkert`.\n\n#### exclude\n\nType: `String|Array`\n\nDefault: `undefined`\n\nSpecify a string or array of characters can are excluded from the possible characters used to generate the randomized string.\n\n**Example:**\n\n* `randomize('*', 20, { exclude: '0oOiIlL1' })` will generate a 20-character randomized string using all of possible characters except for `0oOiIlL1`.\n\n## Usage Examples\n\n* `randomize('A', 4)` (_whitespace insenstive_) would result in randomized 4-digit uppercase letters, like, `ZAKH`, `UJSL`... etc.\n* `randomize('AAAA')` is equivelant to `randomize('A', 4)`\n* `randomize('AAA0')` and `randomize('AA00')` and `randomize('A0A0')` are equivelant to `randomize('A0', 4)`\n* `randomize('aa')`: results in double-digit, randomized, lower-case letters (`abcdefghijklmnopqrstuvwxyz`)\n* `randomize('AAA')`: results in triple-digit, randomized, upper-case letters (`ABCDEFGHIJKLMNOPQRSTUVWXYZ`)\n* `randomize('0', 6)`: results in six-digit, randomized numbers (`0123456789`)\n* `randomize('!', 5)`: results in single-digit randomized, _valid_ non-letter characters (`~!@#$%^&()_+-={}[]\n* `randomize('A!a0', 9)`: results in nine-digit, randomized characters (any of the above)\n\n_The order in which the characters are defined is insignificant._\n\n## About\n\n<details>\n<summary><strong>Contributing</strong></summary>\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n</details>\n\n<details>\n<summary><strong>Running Tests</strong></summary>\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install && npm test\n```\n\n</details>\n\n<details>\n<summary><strong>Building docs</strong></summary>\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme && verb\n```\n\n</details>\n\n### Related projects\n\nYou might also be interested in these projects:\n\n* [pad-left](https://www.npmjs.com/package/pad-left): Left pad a string with zeros or a specified string. Fastest implementation. | [homepage](https://github.com/jonschlinkert/pad-left \"Left pad a string with zeros or a specified string. Fastest implementation.\")\n* [pad-right](https://www.npmjs.com/package/pad-right): Right pad a string with zeros or a specified string. Fastest implementation. | [homepage](https://github.com/jonschlinkert/pad-right \"Right pad a string with zeros or a specified string. Fastest implementation.\")\n* [repeat-string](https://www.npmjs.com/package/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. | [homepage](https://github.com/jonschlinkert/repeat-string \"Repeat the given string n times. Fastest implementation for repeating a string.\")\n\n### Contributors\n\n| **Commits** | **Contributor** |  \n| --- | --- |  \n| 56 | [jonschlinkert](https://github.com/jonschlinkert) |  \n| 6  | [doowb](https://github.com/doowb) |  \n| 4  | [kivlor](https://github.com/kivlor) |  \n| 2  | [realityking](https://github.com/realityking) |  \n| 2  | [ywpark1](https://github.com/ywpark1) |  \n| 1  | [TrySound](https://github.com/TrySound) |  \n| 1  | [drag0s](https://github.com/drag0s) |  \n| 1  | [paulmillr](https://github.com/paulmillr) |  \n| 1  | [sunknudsen](https://github.com/sunknudsen) |  \n| 1  | [faizulhaque-tp](https://github.com/faizulhaque-tp) |  \n| 1  | [michaelrhodes](https://github.com/michaelrhodes) |  \n\n### Author\n\n**Jon Schlinkert**\n\n* [GitHub Profile](https://github.com/jonschlinkert)\n* [Twitter Profile](https://twitter.com/jonschlinkert)\n* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)\n\n### License\n\nCopyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on October 23, 2018._","publish_time":1533760266258,"_cnpm_publish_time":1533760266258,"dist-tags":{"latest":"3.1.1"}}