aboutsummaryrefslogtreecommitdiff
path: root/node_modules/randomatic
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2018-09-20 02:56:13 +0200
committerFlorian Dold <florian.dold@gmail.com>2018-09-20 02:56:13 +0200
commitbbff7403fbf46f9ad92240ac213df8d30ef31b64 (patch)
treec58400ec5124da1c7d56b01aea83309f80a56c3b /node_modules/randomatic
parent003fb34971cf63466184351b4db5f7c67df4f444 (diff)
downloadwallet-core-bbff7403fbf46f9ad92240ac213df8d30ef31b64.tar.xz
update packages
Diffstat (limited to 'node_modules/randomatic')
-rw-r--r--[-rwxr-xr-x]node_modules/randomatic/LICENSE2
-rw-r--r--node_modules/randomatic/README.md48
-rw-r--r--node_modules/randomatic/index.js14
-rw-r--r--node_modules/randomatic/node_modules/kind-of/LICENSE2
-rw-r--r--node_modules/randomatic/node_modules/kind-of/README.md296
-rw-r--r--node_modules/randomatic/node_modules/kind-of/index.js214
-rw-r--r--node_modules/randomatic/node_modules/kind-of/package.json38
-rw-r--r--node_modules/randomatic/package.json28
8 files changed, 390 insertions, 252 deletions
diff --git a/node_modules/randomatic/LICENSE b/node_modules/randomatic/LICENSE
index 3ea726752..38a4a0bf1 100755..100644
--- a/node_modules/randomatic/LICENSE
+++ b/node_modules/randomatic/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2013-2017, Jon Schlinkert
+Copyright (c) 2013-2017, 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
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 [![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)
-> 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
diff --git a/node_modules/randomatic/index.js b/node_modules/randomatic/index.js
index 4681b03e7..64e4f5487 100644
--- a/node_modules/randomatic/index.js
+++ b/node_modules/randomatic/index.js
@@ -9,12 +9,14 @@
var isNumber = require('is-number');
var typeOf = require('kind-of');
+var mathRandom = require('math-random');
/**
* Expose `randomatic`
*/
module.exports = randomatic;
+module.exports.isCrypto = !!mathRandom.cryptographic;
/**
* Available mask characters
@@ -51,7 +53,9 @@ function randomatic(pattern, length, options) {
length = pattern.length;
} else if (isNumber(pattern)) {
- options = {}; length = pattern; pattern = '*';
+ options = {};
+ length = pattern;
+ pattern = '*';
}
}
@@ -75,8 +79,14 @@ function randomatic(pattern, length, options) {
if (pattern.indexOf('*') !== -1) mask += type.all;
if (custom) mask += pattern;
+ // Characters to exclude
+ if (opts.exclude) {
+ var exclude = typeOf(opts.exclude) === 'string' ? opts.exclude : opts.exclude.join('');
+ mask = mask.replace(new RegExp('[' + exclude + ']+', 'g'), '');
+ }
+
while (length--) {
- res += mask.charAt(parseInt(Math.random() * mask.length, 10));
+ res += mask.charAt(parseInt(mathRandom() * mask.length, 10));
}
return res;
};
diff --git a/node_modules/randomatic/node_modules/kind-of/LICENSE b/node_modules/randomatic/node_modules/kind-of/LICENSE
index d734237bd..3f2eca18f 100644
--- a/node_modules/randomatic/node_modules/kind-of/LICENSE
+++ b/node_modules/randomatic/node_modules/kind-of/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2014-2017, Jon Schlinkert
+Copyright (c) 2014-2017, 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
diff --git a/node_modules/randomatic/node_modules/kind-of/README.md b/node_modules/randomatic/node_modules/kind-of/README.md
index 83469b0b6..4b0d4a818 100644
--- a/node_modules/randomatic/node_modules/kind-of/README.md
+++ b/node_modules/randomatic/node_modules/kind-of/README.md
@@ -2,6 +2,8 @@
> Get the native type of a value.
+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
Install with [npm](https://www.npmjs.com/):
@@ -16,9 +18,14 @@ Install with [bower](https://bower.io/)
$ bower install kind-of --save
```
+## Why use this?
+
+1. [it's fast](#benchmarks) | [optimizations](#optimizations)
+2. [better type checking](#better-type-checking)
+
## Usage
-> es5, browser and es6 ready
+> es5, es6, and browser ready
```js
var kindOf = require('kind-of');
@@ -35,24 +42,15 @@ kindOf(true);
kindOf(false);
//=> 'boolean'
-kindOf(new Boolean(true));
-//=> 'boolean'
-
kindOf(new Buffer(''));
//=> 'buffer'
kindOf(42);
//=> 'number'
-kindOf(new Number(42));
-//=> 'number'
-
kindOf('str');
//=> 'string'
-kindOf(new String('str'));
-//=> 'string'
-
kindOf(arguments);
//=> 'arguments'
@@ -68,29 +66,26 @@ kindOf(new Test());
kindOf(new Date());
//=> 'date'
-kindOf([]);
-//=> 'array'
-
kindOf([1, 2, 3]);
//=> 'array'
-kindOf(new Array());
-//=> 'array'
-
kindOf(/foo/);
//=> 'regexp'
kindOf(new RegExp('foo'));
//=> 'regexp'
+kindOf(new Error('error'));
+//=> 'error'
+
kindOf(function () {});
//=> 'function'
kindOf(function * () {});
-//=> 'function'
+//=> 'generatorfunction'
-kindOf(new Function());
-//=> 'function'
+kindOf(Symbol('str'));
+//=> 'symbol'
kindOf(new Map());
//=> 'map'
@@ -104,9 +99,6 @@ kindOf(new Set());
kindOf(new WeakSet());
//=> 'weakset'
-kindOf(Symbol('str'));
-//=> 'symbol'
-
kindOf(new Int8Array());
//=> 'int8array'
@@ -138,68 +130,114 @@ kindOf(new Float64Array());
## Benchmarks
Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of).
-Note that performaces is slower for es6 features `Map`, `WeakMap`, `Set` and `WeakSet`.
```bash
-#1: array
- current x 23,329,397 ops/sec ±0.82% (94 runs sampled)
- lib-type-of x 4,170,273 ops/sec ±0.55% (94 runs sampled)
- lib-typeof x 9,686,935 ops/sec ±0.59% (98 runs sampled)
-
-#2: boolean
- current x 27,197,115 ops/sec ±0.85% (94 runs sampled)
- lib-type-of x 3,145,791 ops/sec ±0.73% (97 runs sampled)
- lib-typeof x 9,199,562 ops/sec ±0.44% (99 runs sampled)
-
-#3: date
- current x 20,190,117 ops/sec ±0.86% (92 runs sampled)
- lib-type-of x 5,166,970 ops/sec ±0.74% (94 runs sampled)
- lib-typeof x 9,610,821 ops/sec ±0.50% (96 runs sampled)
-
-#4: function
- current x 23,855,460 ops/sec ±0.60% (97 runs sampled)
- lib-type-of x 5,667,740 ops/sec ±0.54% (100 runs sampled)
- lib-typeof x 10,010,644 ops/sec ±0.44% (100 runs sampled)
-
-#5: null
- current x 27,061,047 ops/sec ±0.97% (96 runs sampled)
- lib-type-of x 13,965,573 ops/sec ±0.62% (97 runs sampled)
- lib-typeof x 8,460,194 ops/sec ±0.61% (97 runs sampled)
-
-#6: number
- current x 25,075,682 ops/sec ±0.53% (99 runs sampled)
- lib-type-of x 2,266,405 ops/sec ±0.41% (98 runs sampled)
- lib-typeof x 9,821,481 ops/sec ±0.45% (99 runs sampled)
-
-#7: object
- current x 3,348,980 ops/sec ±0.49% (99 runs sampled)
- lib-type-of x 3,245,138 ops/sec ±0.60% (94 runs sampled)
- lib-typeof x 9,262,952 ops/sec ±0.59% (99 runs sampled)
-
-#8: regex
- current x 21,284,827 ops/sec ±0.72% (96 runs sampled)
- lib-type-of x 4,689,241 ops/sec ±0.43% (100 runs sampled)
- lib-typeof x 8,957,593 ops/sec ±0.62% (98 runs sampled)
-
-#9: string
- current x 25,379,234 ops/sec ±0.58% (96 runs sampled)
- lib-type-of x 3,635,148 ops/sec ±0.76% (93 runs sampled)
- lib-typeof x 9,494,134 ops/sec ±0.49% (98 runs sampled)
-
-#10: undef
- current x 27,459,221 ops/sec ±1.01% (93 runs sampled)
- lib-type-of x 14,360,433 ops/sec ±0.52% (99 runs sampled)
- lib-typeof x 23,202,868 ops/sec ±0.59% (94 runs sampled)
+# arguments (32 bytes)
+ kind-of x 17,024,098 ops/sec ±1.90% (86 runs sampled)
+ lib-type-of x 11,926,235 ops/sec ±1.34% (83 runs sampled)
+ lib-typeof x 9,245,257 ops/sec ±1.22% (87 runs sampled)
-```
+ fastest is kind-of (by 161% avg)
+
+# array (22 bytes)
+ kind-of x 17,196,492 ops/sec ±1.07% (88 runs sampled)
+ lib-type-of x 8,838,283 ops/sec ±1.02% (87 runs sampled)
+ lib-typeof x 8,677,848 ops/sec ±0.87% (87 runs sampled)
+
+ fastest is kind-of (by 196% avg)
+
+# boolean (24 bytes)
+ kind-of x 16,841,600 ops/sec ±1.10% (86 runs sampled)
+ lib-type-of x 8,096,787 ops/sec ±0.95% (87 runs sampled)
+ lib-typeof x 8,423,345 ops/sec ±1.15% (86 runs sampled)
+
+ fastest is kind-of (by 204% avg)
+
+# buffer (38 bytes)
+ kind-of x 14,848,060 ops/sec ±1.05% (86 runs sampled)
+ lib-type-of x 3,671,577 ops/sec ±1.49% (87 runs sampled)
+ lib-typeof x 8,360,236 ops/sec ±1.24% (86 runs sampled)
-## Release history
+ fastest is kind-of (by 247% avg)
-### v4.0.0
+# date (30 bytes)
+ kind-of x 16,067,761 ops/sec ±1.58% (86 runs sampled)
+ lib-type-of x 8,954,436 ops/sec ±1.40% (87 runs sampled)
+ lib-typeof x 8,488,307 ops/sec ±1.51% (84 runs sampled)
-**Added**
+ fastest is kind-of (by 184% avg)
-* `promise` support
+# error (36 bytes)
+ kind-of x 9,634,090 ops/sec ±1.12% (89 runs sampled)
+ lib-type-of x 7,735,624 ops/sec ±1.32% (86 runs sampled)
+ lib-typeof x 7,442,160 ops/sec ±1.11% (90 runs sampled)
+
+ fastest is kind-of (by 127% avg)
+
+# function (34 bytes)
+ kind-of x 10,031,494 ops/sec ±1.27% (86 runs sampled)
+ lib-type-of x 9,502,757 ops/sec ±1.17% (89 runs sampled)
+ lib-typeof x 8,278,985 ops/sec ±1.08% (88 runs sampled)
+
+ fastest is kind-of (by 113% avg)
+
+# null (24 bytes)
+ kind-of x 18,159,808 ops/sec ±1.92% (86 runs sampled)
+ lib-type-of x 12,927,635 ops/sec ±1.01% (88 runs sampled)
+ lib-typeof x 7,958,234 ops/sec ±1.21% (89 runs sampled)
+
+ fastest is kind-of (by 174% avg)
+
+# number (22 bytes)
+ kind-of x 17,846,779 ops/sec ±0.91% (85 runs sampled)
+ lib-type-of x 3,316,636 ops/sec ±1.19% (86 runs sampled)
+ lib-typeof x 2,329,477 ops/sec ±2.21% (85 runs sampled)
+
+ fastest is kind-of (by 632% avg)
+
+# object-plain (47 bytes)
+ kind-of x 7,085,155 ops/sec ±1.05% (88 runs sampled)
+ lib-type-of x 8,870,930 ops/sec ±1.06% (83 runs sampled)
+ lib-typeof x 8,716,024 ops/sec ±1.05% (87 runs sampled)
+
+ fastest is lib-type-of (by 112% avg)
+
+# regex (25 bytes)
+ kind-of x 14,196,052 ops/sec ±1.65% (84 runs sampled)
+ lib-type-of x 9,554,164 ops/sec ±1.25% (88 runs sampled)
+ lib-typeof x 8,359,691 ops/sec ±1.07% (87 runs sampled)
+
+ fastest is kind-of (by 158% avg)
+
+# string (33 bytes)
+ kind-of x 16,131,428 ops/sec ±1.41% (85 runs sampled)
+ lib-type-of x 7,273,172 ops/sec ±1.05% (87 runs sampled)
+ lib-typeof x 7,382,635 ops/sec ±1.17% (85 runs sampled)
+
+ fastest is kind-of (by 220% avg)
+
+# symbol (34 bytes)
+ kind-of x 17,011,537 ops/sec ±1.24% (86 runs sampled)
+ lib-type-of x 3,492,454 ops/sec ±1.23% (89 runs sampled)
+ lib-typeof x 7,471,235 ops/sec ±2.48% (87 runs sampled)
+
+ fastest is kind-of (by 310% avg)
+
+# template-strings (36 bytes)
+ kind-of x 15,434,250 ops/sec ±1.46% (83 runs sampled)
+ lib-type-of x 7,157,907 ops/sec ±0.97% (87 runs sampled)
+ lib-typeof x 7,517,986 ops/sec ±0.92% (86 runs sampled)
+
+ fastest is kind-of (by 210% avg)
+
+# undefined (29 bytes)
+ kind-of x 19,167,115 ops/sec ±1.71% (87 runs sampled)
+ lib-type-of x 15,477,740 ops/sec ±1.63% (85 runs sampled)
+ lib-typeof x 19,075,495 ops/sec ±1.17% (83 runs sampled)
+
+ fastest is lib-typeof,kind-of
+
+```
## Optimizations
@@ -208,31 +246,74 @@ In 7 out of 8 cases, this library is 2x-10x faster than other top libraries incl
1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot.
2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it.
3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'`
+4. There is no reason to make the code in a microlib as terse as possible, just to win points for making it shorter. It's always better to favor performant code over terse code. You will always only be using a single `require()` statement to use the library anyway, regardless of how the code is written.
-## About
+## Better type checking
-### Related projects
+kind-of seems to be more consistently "correct" than other type checking libs I've looked at. For example, here are some differing results from other popular libs:
-* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet")
-* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.")
-* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ")
+### [typeof](https://github.com/CodingFu/typeof) lib
+
+Incorrectly identifies instances of custom constructors (pretty common):
-### Contributing
+```js
+var typeOf = require('typeof');
+function Test() {}
+console.log(typeOf(new Test()));
+//=> 'test'
+```
+
+Returns `object` instead of `arguments`:
+
+```js
+function foo() {
+ console.log(typeOf(arguments)) //=> 'object'
+}
+foo();
+```
+
+### [type-of](https://github.com/ForbesLindesay/type-of) lib
+
+Incorrectly returns `object` for generator functions, buffers, `Map`, `Set`, `WeakMap` and `WeakSet`:
+
+```js
+function * foo() {}
+console.log(typeOf(foo));
+//=> 'object'
+console.log(typeOf(new Buffer('')));
+//=> 'object'
+console.log(typeOf(new Map()));
+//=> 'object'
+console.log(typeOf(new Set()));
+//=> 'object'
+console.log(typeOf(new WeakMap()));
+//=> 'object'
+console.log(typeOf(new WeakSet()));
+//=> 'object'
+```
+
+## About
+
+<details>
+<summary><strong>Contributing</strong></summary>
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
-### Contributors
+</details>
-| **Commits** | **Contributor** |
-| --- | --- |
-| 64 | [jonschlinkert](https://github.com/jonschlinkert) |
-| 2 | [miguelmota](https://github.com/miguelmota) |
-| 1 | [dtothefp](https://github.com/dtothefp) |
-| 1 | [ksheedlo](https://github.com/ksheedlo) |
-| 1 | [pdehaan](https://github.com/pdehaan) |
-| 1 | [laggingreflex](https://github.com/laggingreflex) |
+<details>
+<summary><strong>Running Tests</strong></summary>
+
+Running 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:
+
+```sh
+$ npm install && npm test
+```
-### Building docs
+</details>
+
+<details>
+<summary><strong>Building docs</strong></summary>
_(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.)_
@@ -242,18 +323,35 @@ To generate the readme, run the following command:
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```
-### Running tests
+</details>
-Running 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:
+### Related projects
-```sh
-$ npm install && npm test
-```
+You might also be interested in these projects:
+
+* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet")
+* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.")
+* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ")
+
+### Contributors
+
+| **Commits** | **Contributor** |
+| --- | --- |
+| 98 | [jonschlinkert](https://github.com/jonschlinkert) |
+| 3 | [aretecode](https://github.com/aretecode) |
+| 2 | [miguelmota](https://github.com/miguelmota) |
+| 1 | [dtothefp](https://github.com/dtothefp) |
+| 1 | [ianstormtaylor](https://github.com/ianstormtaylor) |
+| 1 | [ksheedlo](https://github.com/ksheedlo) |
+| 1 | [pdehaan](https://github.com/pdehaan) |
+| 1 | [laggingreflex](https://github.com/laggingreflex) |
+| 1 | [charlike-old](https://github.com/charlike-old) |
### Author
**Jon Schlinkert**
+* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert)
* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
@@ -264,4 +362,4 @@ 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 May 19, 2017._ \ No newline at end of file
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on December 01, 2017._ \ No newline at end of file
diff --git a/node_modules/randomatic/node_modules/kind-of/index.js b/node_modules/randomatic/node_modules/kind-of/index.js
index 4c0233bc7..aa2bb3944 100644
--- a/node_modules/randomatic/node_modules/kind-of/index.js
+++ b/node_modules/randomatic/node_modules/kind-of/index.js
@@ -1,119 +1,129 @@
-var isBuffer = require('is-buffer');
var toString = Object.prototype.toString;
-/**
- * Get the native `typeof` a value.
- *
- * @param {*} `val`
- * @return {*} Native javascript type
- */
-
module.exports = function kindOf(val) {
- // primitivies
- if (typeof val === 'undefined') {
- return 'undefined';
- }
- if (val === null) {
- return 'null';
- }
- if (val === true || val === false || val instanceof Boolean) {
- return 'boolean';
- }
- if (typeof val === 'string' || val instanceof String) {
- return 'string';
- }
- if (typeof val === 'number' || val instanceof Number) {
- return 'number';
- }
+ if (val === void 0) return 'undefined';
+ if (val === null) return 'null';
- // functions
- if (typeof val === 'function' || val instanceof Function) {
- return 'function';
+ var type = typeof val;
+ if (type === 'boolean') return 'boolean';
+ if (type === 'string') return 'string';
+ if (type === 'number') return 'number';
+ if (type === 'symbol') return 'symbol';
+ if (type === 'function') {
+ return isGeneratorFn(val) ? 'generatorfunction' : 'function';
}
- // array
- if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) {
- return 'array';
- }
+ if (isArray(val)) return 'array';
+ if (isBuffer(val)) return 'buffer';
+ if (isArguments(val)) return 'arguments';
+ if (isDate(val)) return 'date';
+ if (isError(val)) return 'error';
+ if (isRegexp(val)) return 'regexp';
- // check for instances of RegExp and Date before calling `toString`
- if (val instanceof RegExp) {
- return 'regexp';
- }
- if (val instanceof Date) {
- return 'date';
- }
+ switch (ctorName(val)) {
+ case 'Symbol': return 'symbol';
+ case 'Promise': return 'promise';
- // other objects
- var type = toString.call(val);
+ // Set, Map, WeakSet, WeakMap
+ case 'WeakMap': return 'weakmap';
+ case 'WeakSet': return 'weakset';
+ case 'Map': return 'map';
+ case 'Set': return 'set';
- if (type === '[object RegExp]') {
- return 'regexp';
- }
- if (type === '[object Date]') {
- return 'date';
- }
- if (type === '[object Arguments]') {
- return 'arguments';
- }
- if (type === '[object Error]') {
- return 'error';
- }
- if (type === '[object Promise]') {
- return 'promise';
- }
+ // 8-bit typed arrays
+ case 'Int8Array': return 'int8array';
+ case 'Uint8Array': return 'uint8array';
+ case 'Uint8ClampedArray': return 'uint8clampedarray';
- // buffer
- if (isBuffer(val)) {
- return 'buffer';
- }
+ // 16-bit typed arrays
+ case 'Int16Array': return 'int16array';
+ case 'Uint16Array': return 'uint16array';
- // es6: Map, WeakMap, Set, WeakSet
- if (type === '[object Set]') {
- return 'set';
- }
- if (type === '[object WeakSet]') {
- return 'weakset';
- }
- if (type === '[object Map]') {
- return 'map';
- }
- if (type === '[object WeakMap]') {
- return 'weakmap';
- }
- if (type === '[object Symbol]') {
- return 'symbol';
+ // 32-bit typed arrays
+ case 'Int32Array': return 'int32array';
+ case 'Uint32Array': return 'uint32array';
+ case 'Float32Array': return 'float32array';
+ case 'Float64Array': return 'float64array';
}
- // typed arrays
- if (type === '[object Int8Array]') {
- return 'int8array';
+ if (isGeneratorObj(val)) {
+ return 'generator';
}
- if (type === '[object Uint8Array]') {
- return 'uint8array';
- }
- if (type === '[object Uint8ClampedArray]') {
- return 'uint8clampedarray';
- }
- if (type === '[object Int16Array]') {
- return 'int16array';
- }
- if (type === '[object Uint16Array]') {
- return 'uint16array';
- }
- if (type === '[object Int32Array]') {
- return 'int32array';
- }
- if (type === '[object Uint32Array]') {
- return 'uint32array';
- }
- if (type === '[object Float32Array]') {
- return 'float32array';
- }
- if (type === '[object Float64Array]') {
- return 'float64array';
+
+ // Non-plain objects
+ type = toString.call(val);
+ switch (type) {
+ case '[object Object]': return 'object';
+ // iterators
+ case '[object Map Iterator]': return 'mapiterator';
+ case '[object Set Iterator]': return 'setiterator';
+ case '[object String Iterator]': return 'stringiterator';
+ case '[object Array Iterator]': return 'arrayiterator';
}
- // must be a plain object
- return 'object';
+ // other
+ return type.slice(8, -1).toLowerCase().replace(/\s/g, '');
};
+
+function ctorName(val) {
+ return val.constructor ? val.constructor.name : null;
+}
+
+function isArray(val) {
+ if (Array.isArray) return Array.isArray(val);
+ return val instanceof Array;
+}
+
+function isError(val) {
+ return val instanceof Error || (typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number');
+}
+
+function isDate(val) {
+ if (val instanceof Date) return true;
+ return typeof val.toDateString === 'function'
+ && typeof val.getDate === 'function'
+ && typeof val.setDate === 'function';
+}
+
+function isRegexp(val) {
+ if (val instanceof RegExp) return true;
+ return typeof val.flags === 'string'
+ && typeof val.ignoreCase === 'boolean'
+ && typeof val.multiline === 'boolean'
+ && typeof val.global === 'boolean';
+}
+
+function isGeneratorFn(name, val) {
+ return ctorName(name) === 'GeneratorFunction';
+}
+
+function isGeneratorObj(val) {
+ return typeof val.throw === 'function'
+ && typeof val.return === 'function'
+ && typeof val.next === 'function';
+}
+
+function isArguments(val) {
+ try {
+ if (typeof val.length === 'number' && typeof val.callee === 'function') {
+ return true;
+ }
+ } catch (err) {
+ if (err.message.indexOf('callee') !== -1) {
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ * If you need to support Safari 5-7 (8-10 yr-old browser),
+ * take a look at https://github.com/feross/is-buffer
+ */
+
+function isBuffer(val) {
+ if (val.constructor && typeof val.constructor.isBuffer === 'function') {
+ return val.constructor.isBuffer(val);
+ }
+ return false;
+}
diff --git a/node_modules/randomatic/node_modules/kind-of/package.json b/node_modules/randomatic/node_modules/kind-of/package.json
index 222afc0b2..73d70aee4 100644
--- a/node_modules/randomatic/node_modules/kind-of/package.json
+++ b/node_modules/randomatic/node_modules/kind-of/package.json
@@ -1,16 +1,18 @@
{
"name": "kind-of",
"description": "Get the native type of a value.",
- "version": "4.0.0",
+ "version": "6.0.2",
"homepage": "https://github.com/jonschlinkert/kind-of",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"contributors": [
"David Fox-Powell (https://dtothefp.github.io/me)",
+ "James (https://twitter.com/aretecode)",
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
"Ken Sheedlo (kensheedlo.com)",
"laggingreflex (https://github.com/laggingreflex)",
"Miguel Mota (https://miguelmota.com)",
- "Peter deHaan (http://about.me/peterdehaan)"
+ "Peter deHaan (http://about.me/peterdehaan)",
+ "tunnckoCore (https://i.am.charlike.online)"
],
"repository": "jonschlinkert/kind-of",
"bugs": {
@@ -28,18 +30,12 @@
"test": "mocha",
"prepublish": "browserify -o browser.js -e index.js -s index --bare"
},
- "dependencies": {
- "is-buffer": "^1.1.5"
- },
"devDependencies": {
- "ansi-bold": "^0.1.1",
- "benchmarked": "^1.1.1",
- "browserify": "^14.3.0",
- "glob": "^7.1.1",
- "gulp-format-md": "^0.1.12",
- "mocha": "^3.4.1",
- "type-of": "^2.0.1",
- "typeof": "^1.0.0"
+ "benchmarked": "^2.0.0",
+ "browserify": "^14.4.0",
+ "gulp-format-md": "^1.0.0",
+ "mocha": "^4.0.1",
+ "write": "^1.0.3"
},
"keywords": [
"arguments",
@@ -65,13 +61,6 @@
"types"
],
"verb": {
- "related": {
- "list": [
- "is-glob",
- "is-number",
- "is-primitive"
- ]
- },
"toc": false,
"layout": "default",
"tasks": [
@@ -83,7 +72,16 @@
"lint": {
"reflinks": true
},
+ "related": {
+ "list": [
+ "is-glob",
+ "is-number",
+ "is-primitive"
+ ]
+ },
"reflinks": [
+ "type-of",
+ "typeof",
"verb"
]
}
diff --git a/node_modules/randomatic/package.json b/node_modules/randomatic/package.json
index acb4cd53c..e5cf7a70b 100644
--- a/node_modules/randomatic/package.json
+++ b/node_modules/randomatic/package.json
@@ -1,15 +1,18 @@
{
"name": "randomatic",
- "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.",
- "version": "1.1.7",
+ "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": "Jon Schlinkert (https://github.com/jonschlinkert)",
"contributors": [
"Bogdan Chadkin (https://github.com/TrySound)",
"Dragos Fotescu (http://dragosfotescu.com)",
+ "Faiz ul haque (http://www.10pearls.com)",
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
- "Paul Miller (paulmillr.com)",
- "Sun Knudsen (http://sunknudsen.com)"
+ "Michael Rhodes (http://michaelrhod.es)",
+ "Paul Miller (https://paulmillr.com)",
+ "Rouven Weßling (www.rouvenwessling.de)",
+ "Sun Knudsen (https://sunknudsen.com)"
],
"repository": "jonschlinkert/randomatic",
"bugs": {
@@ -27,16 +30,16 @@
"test": "mocha"
},
"dependencies": {
- "is-number": "^3.0.0",
- "kind-of": "^4.0.0"
+ "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",
- "should": "^11.2.1"
+ "mocha": "^3.4.2"
},
"keywords": [
"alpha",
@@ -44,7 +47,10 @@
"alphanumeric",
"characters",
"chars",
+ "generate",
+ "generate-password",
"numeric",
+ "password",
"rand",
"random",
"randomatic",
@@ -69,10 +75,6 @@
},
"lint": {
"reflinks": true
- },
- "reflinks": [
- "verb",
- "verb-generate-readme"
- ]
+ }
}
}