{"name":"randomatic","description":"Generate randomized strings of a specified length using simple character sequences. The original generate-password.","version":"2.0.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":"Paul Miller","url":"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"},"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","numeric","password","generate","generate-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":"833f31a5aac0b8c2ddd3ae23ab41a0145c2974d0","_id":"randomatic@2.0.0","_npmVersion":"5.4.2","_nodeVersion":"8.7.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"dist":{"integrity":"sha512-IRvNtlVqDeoh6O86Z6MpuKwHwVy3vxBel3zKvhMzIVOS7cviLyLBQRzsuBij9PIqmdGYL/WWZReJpSLHH7Jcog==","shasum":"14f1c3774a905620b0e748043c36b754dbcc37d2","tarball":"http://registry-npm.ywwl.com/randomatic/download/randomatic-2.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG+y7KE7VtT8ycsej5qFjEI5+bw/vVvLZobcjq2nw/9mAiBa9q+vpHfXNuOwuXxWixvv+htCHF2EkoqUqSDZ1r7eeA=="}],"size":4321,"noattachment":false,"key":"/randomatic/-/randomatic-2.0.0.tgz"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/randomatic-2.0.0.tgz_1508414873571_0.1864740715827793"},"directories":{},"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":1508414875924,"_cnpm_publish_time":1508414875924,"dist-tags":{"latest":"3.1.1"}}