Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nopt

Package Overview
Dependencies
Maintainers
3
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nopt - npm Package Compare versions

Comparing version 3.0.5 to 3.0.6

6

lib/nopt.js

@@ -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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc