Comparing version 3.0.5 to 3.0.6
@@ -210,6 +210,4 @@ // info about each config option. | ||
var t = typeDefs[types[i]] | ||
if (t && ((type.name && t.type.name) ? | ||
(type.name === t.type.name) : | ||
(type === t.type)) | ||
) { | ||
if (t && | ||
((type && type.name && t.type && t.type.name) ? (type.name === t.type.name) : (type === t.type))) { | ||
var d = {} | ||
@@ -216,0 +214,0 @@ ok = false !== t.validate(d, k, val) |
{ | ||
"name": "nopt", | ||
"version": "3.0.5", | ||
"version": "3.0.6", | ||
"description": "Option parsing for Node, supporting types, shorthands, etc. Used by npm.", | ||
@@ -5,0 +5,0 @@ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)", |
@@ -42,3 +42,3 @@ var nopt = require("../") | ||
test("Types passed without a name are not parsed", function (t) { | ||
test("Missing types are not parsed", function (t) { | ||
var parsed = nopt({"parse-me": {}}, null, ['--parse-me=1.20'], 0) | ||
@@ -50,2 +50,9 @@ //should only contain argv | ||
test("Types passed without a name are not parsed", function (t) { | ||
var parsed = nopt({"parse-me": {}}, {}, ['--parse-me=1.20'], 0) | ||
//should only contain argv | ||
t.equal(Object.keys(parsed).length, 1) | ||
t.end() | ||
}) | ||
test("other tests", function (t) { | ||
@@ -52,0 +59,0 @@ |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
31321
693
0