Template Upload
This commit is contained in:
21
node_modules/randomatic/LICENSE
generated
vendored
Normal file
21
node_modules/randomatic/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013-2016, Jon Schlinkert
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
152
node_modules/randomatic/README.md
generated
vendored
Normal file
152
node_modules/randomatic/README.md
generated
vendored
Normal file
@ -0,0 +1,152 @@
|
||||
# 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.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm install --save randomatic
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var randomize = require('randomatic');
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
```js
|
||||
randomize(pattern, length, options);
|
||||
```
|
||||
|
||||
* `pattern` **{String}**: The pattern to use for randomizing
|
||||
* `length` **{Object}**: The length of the string to generate
|
||||
|
||||
### pattern
|
||||
|
||||
> The pattern to use for randomizing
|
||||
|
||||
Patterns can contain any combination of the below characters, specified in any order.
|
||||
|
||||
**Example:**
|
||||
|
||||
To generate a 10-character randomized string using all available characters:
|
||||
|
||||
```js
|
||||
randomize('*', 10);
|
||||
//=>
|
||||
|
||||
randomize('Aa0!', 10);
|
||||
//=>
|
||||
```
|
||||
|
||||
* `a`: Lowercase alpha characters (`abcdefghijklmnopqrstuvwxyz'`)
|
||||
* `A`: Uppercase alpha characters (`ABCDEFGHIJKLMNOPQRSTUVWXYZ'`)
|
||||
* `0`: Numeric characters (`0123456789'`)
|
||||
* `!`: Special characters (`~!@#$%^&()_+-={}[];\',.`)
|
||||
* `*`: All characters (all of the above combined)
|
||||
* `?`: Custom characters (pass a string of custom characters to the options)
|
||||
|
||||
### length
|
||||
|
||||
> the length of the string to generate
|
||||
|
||||
**Examples:**
|
||||
|
||||
* `randomize('A', 5)` will generate a 5-character, uppercase, alphabetical, randomized string, e.g. `KDJWJ`.
|
||||
* `randomize('0', 2)` will generate a 2-digit random number
|
||||
* `randomize('0', 3)` will generate a 3-digit random number
|
||||
* `randomize('0', 12)` will generate a 12-digit random number
|
||||
* `randomize('A0', 16)` will generate a 16-character, alpha-numeric randomized string
|
||||
|
||||
If `length` is left undefined, the length of the pattern in the first parameter will be used. For example:
|
||||
|
||||
* `randomize('00')` will generate a 2-digit random number
|
||||
* `randomize('000')` will generate a 3-digit random number
|
||||
* `randomize('0000')` will generate a 4-digit random number...
|
||||
* `randomize('AAAAA')` will generate a 5-character, uppercase alphabetical random string...
|
||||
|
||||
These are just examples, [see the tests](./test.js) for more use cases and examples.
|
||||
|
||||
#### chars
|
||||
|
||||
Type: `String`
|
||||
|
||||
Default: `undefined`
|
||||
|
||||
Define a custom string to be randomized.
|
||||
|
||||
**Example:**
|
||||
|
||||
* `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`.
|
||||
|
||||
## Usage Examples
|
||||
|
||||
* `randomize('A', 4)` (_whitespace insenstive_) would result in randomized 4-digit uppercase letters, like, `ZAKH`, `UJSL`... etc.
|
||||
* `randomize('AAAA')` is equivelant to `randomize('A', 4)`
|
||||
* `randomize('AAA0')` and `randomize('AA00')` and `randomize('A0A0')` are equivelant to `randomize('A0', 4)`
|
||||
* `randomize('aa')`: results in double-digit, randomized, lower-case letters (`abcdefghijklmnopqrstuvwxyz`)
|
||||
* `randomize('AAA')`: results in triple-digit, randomized, upper-case letters (`ABCDEFGHIJKLMNOPQRSTUVWXYZ`)
|
||||
* `randomize('0', 6)`: results in six-digit, randomized nubmers (`0123456789`)
|
||||
* `randomize('!', 5)`: results in single-digit randomized, _valid_ non-letter characters (`~!@#$%^&()_+-={}[];\',.`)
|
||||
* `randomize('A!a0', 9)`: results in nine-digit, randomized characters (any of the above)
|
||||
|
||||
_The order in which the characters are defined is insignificant._
|
||||
|
||||
## About
|
||||
|
||||
### Related projects
|
||||
|
||||
* [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.")
|
||||
* [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.")
|
||||
* [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.")
|
||||
|
||||
### Contributing
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
||||
|
||||
### Contributors
|
||||
|
||||
| **Commits** | **Contributor**<br/> |
|
||||
| --- | --- |
|
||||
| 36 | [jonschlinkert](https://github.com/jonschlinkert) |
|
||||
| 1 | [TrySound](https://github.com/TrySound) |
|
||||
| 1 | [paulmillr](https://github.com/paulmillr) |
|
||||
|
||||
### Building docs
|
||||
|
||||
_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
|
||||
|
||||
To generate the readme and API documentation with [verb](https://github.com/verbose/verb):
|
||||
|
||||
```sh
|
||||
$ npm install -g verb verb-generate-readme && verb
|
||||
```
|
||||
|
||||
### Running tests
|
||||
|
||||
Install dev dependencies:
|
||||
|
||||
```sh
|
||||
$ npm install -d && npm test
|
||||
```
|
||||
|
||||
### Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
|
||||
|
||||
### License
|
||||
|
||||
Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
|
||||
Released under the [MIT license](https://github.com/jonschlinkert/randomatic/blob/master/LICENSE).
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on November 24, 2016._
|
83
node_modules/randomatic/index.js
generated
vendored
Normal file
83
node_modules/randomatic/index.js
generated
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
/*!
|
||||
* randomatic <https://github.com/jonschlinkert/randomatic>
|
||||
*
|
||||
* This was originally inspired by <http://stackoverflow.com/a/10727155/1267639>
|
||||
* Copyright (c) 2014-2015, Jon Schlinkert.
|
||||
* Licensed under the MIT License (MIT)
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var isNumber = require('is-number');
|
||||
var typeOf = require('kind-of');
|
||||
|
||||
/**
|
||||
* Expose `randomatic`
|
||||
*/
|
||||
|
||||
module.exports = randomatic;
|
||||
|
||||
/**
|
||||
* Available mask characters
|
||||
*/
|
||||
|
||||
var type = {
|
||||
lower: 'abcdefghijklmnopqrstuvwxyz',
|
||||
upper: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
|
||||
number: '0123456789',
|
||||
special: '~!@#$%^&()_+-={}[];\',.'
|
||||
};
|
||||
|
||||
type.all = type.lower + type.upper + type.number;
|
||||
|
||||
/**
|
||||
* Generate random character sequences of a specified `length`,
|
||||
* based on the given `pattern`.
|
||||
*
|
||||
* @param {String} `pattern` The pattern to use for generating the random string.
|
||||
* @param {String} `length` The length of the string to generate.
|
||||
* @param {String} `options`
|
||||
* @return {String}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
function randomatic(pattern, length, options) {
|
||||
if (typeof pattern === 'undefined') {
|
||||
throw new Error('randomatic expects a string or number.');
|
||||
}
|
||||
|
||||
var custom = false;
|
||||
if (arguments.length === 1) {
|
||||
if (typeof pattern === 'string') {
|
||||
length = pattern.length;
|
||||
|
||||
} else if (isNumber(pattern)) {
|
||||
options = {}; length = pattern; pattern = '*';
|
||||
}
|
||||
}
|
||||
|
||||
if (typeOf(length) === 'object' && length.hasOwnProperty('chars')) {
|
||||
options = length;
|
||||
pattern = options.chars;
|
||||
length = pattern.length;
|
||||
custom = true;
|
||||
}
|
||||
|
||||
var opts = options || {};
|
||||
var mask = '';
|
||||
var res = '';
|
||||
|
||||
// Characters to be used
|
||||
if (pattern.indexOf('?') !== -1) mask += opts.chars;
|
||||
if (pattern.indexOf('a') !== -1) mask += type.lower;
|
||||
if (pattern.indexOf('A') !== -1) mask += type.upper;
|
||||
if (pattern.indexOf('0') !== -1) mask += type.number;
|
||||
if (pattern.indexOf('!') !== -1) mask += type.special;
|
||||
if (pattern.indexOf('*') !== -1) mask += type.all;
|
||||
if (custom) mask += pattern;
|
||||
|
||||
while (length--) {
|
||||
res += mask.charAt(parseInt(Math.random() * mask.length, 10));
|
||||
}
|
||||
return res;
|
||||
};
|
132
node_modules/randomatic/package.json
generated
vendored
Normal file
132
node_modules/randomatic/package.json
generated
vendored
Normal file
@ -0,0 +1,132 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"randomatic@^1.1.3",
|
||||
"C:\\Users\\x2mjbyrn\\Source\\Repos\\Skeleton\\node_modules\\fill-range"
|
||||
]
|
||||
],
|
||||
"_from": "randomatic@>=1.1.3-0 <2.0.0-0",
|
||||
"_id": "randomatic@1.1.6",
|
||||
"_inCache": true,
|
||||
"_location": "/randomatic",
|
||||
"_nodeVersion": "6.7.0",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-18-east.internal.npmjs.com",
|
||||
"tmp": "tmp/randomatic-1.1.6.tgz_1480022662943_0.08446102566085756"
|
||||
},
|
||||
"_npmUser": {
|
||||
"email": "github@sellside.com",
|
||||
"name": "jonschlinkert"
|
||||
},
|
||||
"_npmVersion": "3.10.3",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "randomatic",
|
||||
"raw": "randomatic@^1.1.3",
|
||||
"rawSpec": "^1.1.3",
|
||||
"scope": null,
|
||||
"spec": ">=1.1.3-0 <2.0.0-0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/fill-range"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.6.tgz",
|
||||
"_shasum": "110dcabff397e9dcff7c0789ccc0a49adf1ec5bb",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "randomatic@^1.1.3",
|
||||
"_where": "C:\\Users\\x2mjbyrn\\Source\\Repos\\Skeleton\\node_modules\\fill-range",
|
||||
"author": {
|
||||
"name": "Jon Schlinkert",
|
||||
"url": "https://github.com/jonschlinkert"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/randomatic/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"is-number": "^2.0.2",
|
||||
"kind-of": "^3.0.2"
|
||||
},
|
||||
"description": "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.",
|
||||
"devDependencies": {
|
||||
"ansi-bold": "^0.1.1",
|
||||
"benchmarked": "^0.1.4",
|
||||
"glob": "^5.0.15",
|
||||
"gulp-format-md": "^0.1.11",
|
||||
"mocha": "*",
|
||||
"should": "*"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "110dcabff397e9dcff7c0789ccc0a49adf1ec5bb",
|
||||
"tarball": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.6.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "80065df04deaa8f7a405d2689aaaef57117c6a94",
|
||||
"homepage": "https://github.com/jonschlinkert/randomatic",
|
||||
"installable": true,
|
||||
"keywords": [
|
||||
"alpha",
|
||||
"alpha-numeric",
|
||||
"alphanumeric",
|
||||
"characters",
|
||||
"chars",
|
||||
"numeric",
|
||||
"rand",
|
||||
"random",
|
||||
"randomatic",
|
||||
"randomize",
|
||||
"randomized"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "doowb",
|
||||
"email": "brian.woodward@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "jonschlinkert",
|
||||
"email": "github@sellside.com"
|
||||
}
|
||||
],
|
||||
"name": "randomatic",
|
||||
"optionalDependencies": {},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/jonschlinkert/randomatic.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"verb": {
|
||||
"layout": "default",
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
},
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"reflinks": [
|
||||
"verb",
|
||||
"verb-generate-readme"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"pad-left",
|
||||
"pad-right",
|
||||
"repeat-string"
|
||||
]
|
||||
},
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"toc": false
|
||||
},
|
||||
"version": "1.1.6"
|
||||
}
|
Reference in New Issue
Block a user