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

assert-plus

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

assert-plus - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

32

assert.js

@@ -28,2 +28,6 @@ // Copyright (c) 2012, Mark Cavage. All rights reserved.

function uncapitalize(str) {
return (str.charAt(0).toLowerCase() + str.slice(1));
}
function _() {

@@ -159,11 +163,21 @@ return (util.format.apply(util, arguments));

var _name = 'optional' + capitalize(k);
if (k === 'bool')
k = 'boolean';
if (k === 'func')
k = 'function';
module.exports[_name] = function (arg, name) {
if (!NDEBUG && arg !== undefined) {
_assert(arg, k, name);
}
};
var s = uncapitalize(k.replace('arrayOf', ''));
if (s === 'bool')
s = 'boolean';
if (s === 'func')
s = 'function';
if (k.indexOf('arrayOf') !== -1) {
module.exports[_name] = function (arg, name) {
if (!NDEBUG && arg !== undefined) {
array(arg, s, name);
}
};
} else {
module.exports[_name] = function (arg, name) {
if (!NDEBUG && arg !== undefined) {
_assert(arg, s, name);
}
};
}
});

@@ -170,0 +184,0 @@

@@ -5,3 +5,3 @@ {

"description": "Extra assertions on top of node's assert module",
"version": "0.1.1",
"version": "0.1.2",
"main": "./assert.js",

@@ -8,0 +8,0 @@ "dependencies": {},

@@ -1,2 +0,2 @@

# node-assert-extra
# node-assert-plus

@@ -3,0 +3,0 @@ This library is a super small wrapper over node's assert module that has two

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