summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/aproba
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/aproba')
-rw-r--r--deps/npm/node_modules/aproba/README.md22
-rw-r--r--deps/npm/node_modules/aproba/index.js18
-rw-r--r--deps/npm/node_modules/aproba/package.json30
3 files changed, 35 insertions, 35 deletions
diff --git a/deps/npm/node_modules/aproba/README.md b/deps/npm/node_modules/aproba/README.md
index a9d38222a7..79e865924d 100644
--- a/deps/npm/node_modules/aproba/README.md
+++ b/deps/npm/node_modules/aproba/README.md
@@ -20,17 +20,17 @@ myfunc('test', 23, function () {}, true) // too many args error
Valid types are:
-type | description
----- | -----------
-* | matches any type
-A | Array.isArray OR an arguments object
-S | typeof == string
-N | typeof == number
-F | typeof == function
-O | typeof == object and not type A and not type E
-B | typeof == boolean
-E | instanceof Error OR null **(special: see below)**
-Z | == null
+| type | description
+| :--: | :----------
+| * | matches any type
+| A | `Array.isArray` OR an `arguments` object
+| S | typeof == string
+| N | typeof == number
+| F | typeof == function
+| O | typeof == object and not type A and not type E
+| B | typeof == boolean
+| E | `instanceof Error` OR `null` **(special: see below)**
+| Z | == `null`
Validation failures throw one of three exception types, distinguished by a
`code` property of `EMISSINGARG`, `EINVALIDTYPE` or `ETOOMANYARGS`.
diff --git a/deps/npm/node_modules/aproba/index.js b/deps/npm/node_modules/aproba/index.js
index bc6ed1f17b..4f8c1fc7d8 100644
--- a/deps/npm/node_modules/aproba/index.js
+++ b/deps/npm/node_modules/aproba/index.js
@@ -16,6 +16,11 @@ var types = {
Z: {label: 'null', check: function (thingy) { return thingy == null }}
}
+function addSchema (schema, arity) {
+ var group = arity[schema.length] = arity[schema.length] || []
+ if (group.indexOf(schema) === -1) group.push(schema)
+}
+
var validate = module.exports = function (rawSchemas, args) {
if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length)
if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas')
@@ -24,21 +29,18 @@ var validate = module.exports = function (rawSchemas, args) {
if (!types.A.check(args)) throw invalidType(1, ['array'], args)
var schemas = rawSchemas.split('|')
var arity = {}
- function addSchema (schema) {
- var group = arity[schema.length] = arity[schema.length] || []
- if (group.indexOf(schema) === -1) group.push(schema)
- }
+
schemas.forEach(function (schema) {
for (var ii = 0; ii < schema.length; ++ii) {
var type = schema[ii]
if (!types[type]) throw unknownType(ii, type)
}
if (/E.*E/.test(schema)) throw moreThanOneError(schema)
- addSchema(schema)
+ addSchema(schema, arity)
if (/E/.test(schema)) {
- addSchema(schema.replace(/E.*$/, 'E'))
- addSchema(schema.replace(/E/, 'Z'))
- if (schema.length === 1) addSchema('')
+ addSchema(schema.replace(/E.*$/, 'E'), arity)
+ addSchema(schema.replace(/E/, 'Z'), arity)
+ if (schema.length === 1) addSchema('', arity)
}
})
var matching = arity[args.length]
diff --git a/deps/npm/node_modules/aproba/package.json b/deps/npm/node_modules/aproba/package.json
index ba6cb1385d..e3a85f4066 100644
--- a/deps/npm/node_modules/aproba/package.json
+++ b/deps/npm/node_modules/aproba/package.json
@@ -1,36 +1,36 @@
{
- "_from": "aproba@~1.1.1",
- "_id": "aproba@1.1.1",
- "_integrity": "sha1-ldNgDwdxCqDpKYxyatXs8urLq6s=",
+ "_from": "aproba@1.1.2",
+ "_id": "aproba@1.1.2",
+ "_inBundle": false,
+ "_integrity": "sha512-ZpYajIfO0j2cOFTO955KUMIKNmj6zhX8kVztMAxFsDaMwz+9Z9SV0uou2pC9HJqcfpffOsjnbrDMvkNy+9RXPw==",
"_location": "/aproba",
"_phantomChildren": {},
"_requested": {
- "type": "range",
+ "type": "version",
"registry": true,
- "raw": "aproba@~1.1.1",
+ "raw": "aproba@1.1.2",
"name": "aproba",
"escapedName": "aproba",
- "rawSpec": "~1.1.1",
+ "rawSpec": "1.1.2",
"saveSpec": null,
- "fetchSpec": "~1.1.1"
+ "fetchSpec": "1.1.2"
},
"_requiredBy": [
+ "#USER",
"/",
"/move-concurrently",
"/move-concurrently/copy-concurrently",
"/move-concurrently/run-queue",
"/npmlog/gauge"
],
- "_resolved": "https://registry.npmjs.org/aproba/-/aproba-1.1.1.tgz",
- "_shasum": "95d3600f07710aa0e9298c726ad5ecf2eacbabab",
- "_shrinkwrap": null,
- "_spec": "aproba@~1.1.1",
- "_where": "/Users/zkat/Documents/code/npm",
+ "_resolved": "https://registry.npmjs.org/aproba/-/aproba-1.1.2.tgz",
+ "_shasum": "45c6629094de4e96f693ef7eab74ae079c240fc1",
+ "_spec": "aproba@1.1.2",
+ "_where": "/Users/rebecca/code/npm",
"author": {
"name": "Rebecca Turner",
"email": "me@re-becca.org"
},
- "bin": null,
"bugs": {
"url": "https://github.com/iarna/aproba/issues"
},
@@ -56,8 +56,6 @@
"license": "ISC",
"main": "index.js",
"name": "aproba",
- "optionalDependencies": {},
- "peerDependencies": {},
"repository": {
"type": "git",
"url": "git+https://github.com/iarna/aproba.git"
@@ -65,5 +63,5 @@
"scripts": {
"test": "standard && tap -j3 test/*.js"
},
- "version": "1.1.1"
+ "version": "1.1.2"
}