muxrpc-validation
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -29,2 +29,6 @@ var zerr = require('zerr') | ||
return 'type' | ||
}, | ||
array: function (param, n) { | ||
if (!Array.isArray(param)) | ||
return 'type' | ||
} | ||
@@ -59,5 +63,6 @@ } | ||
var args = Array.prototype.slice.call(arguments) | ||
var hasCb = (typeof args[args.length - 1] == 'function') | ||
// get cb | ||
var cb = (typeof args[args.length - 1] == 'function') | ||
var cb = (hasCb) | ||
? args[args.length - 1] | ||
@@ -67,3 +72,3 @@ : function (err) { if (err) { throw err; } } | ||
// run validation | ||
var err = validate(args, spec) | ||
var err = validate((hasCb) ? args.slice(0,args.length-1) : args, spec) | ||
if (err) return cb(err) | ||
@@ -70,0 +75,0 @@ |
{ | ||
"name": "muxrpc-validation", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Validation library for muxrpc apis", | ||
@@ -22,3 +22,7 @@ "main": "index.js", | ||
}, | ||
"homepage": "https://github.com/pfraze/muxrpc-validation#readme" | ||
"homepage": "https://github.com/pfraze/muxrpc-validation#readme", | ||
"dependencies": { | ||
"pull-stream": "^2.28.3", | ||
"zerr": "^1.0.1" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5544
140
2
+ Addedpull-stream@^2.28.3
+ Addedzerr@^1.0.1
+ Addedpull-core@1.1.0(transitive)
+ Addedpull-stream@2.28.4(transitive)
+ Addedzerr@1.0.4(transitive)