Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
chai-nodules-helpers
Advanced tools
$ npm install chai-nodules-helpers
var assert = require('chai').use(require('chai-nodules-helpers')).assert;
assert.throwTerror(...);
assert.mixedProperly(...);
All assertions available for assert style only.
assert.isMixed(Target, Mixin, mixinName, staticExceptions, prototypeExceptions, mixingArgs)
{Objex} Target
– constructor;{Function|Object} Mixin
– mixin;{String} mixinName
– used in assertions messages;{String[]} staticExceptions
– array of statics propertyies names excluded from assertions;{String[]} prototypeExceptions
– array of prototypes propertyies names excluded from assertions;{Array} [mixingArgs]
– additional arguments to pass to mixin()
after Mixin
itself.assert.canBeMixed(Target, Mixin, mixinName, staticExceptions, prototypeExceptions, mixingArgs)
{Objex} Target
– constructor, inheritor of the Objex, mixin
method applies to;{Function|Object} Mixin
– mixin;{String} mixinName
– used in assertions messages;{String[]} staticExceptions
– array of statics propertyies names excluded from assertions;{String[]} prototypeExceptions
– array of prototypes propertyies names excluded from assertions;{Array} [mixingArgs]
– additional arguments to pass to mixin()
after Mixin
itself.assert.throwTerror(fn, ErrorClass, spec)
{Function} fn
– a function which expected to throw;{Fucntion|Error|Terror} [ErrorClass]
– must be a Terror inheritor, if spec
is specified, or any Error inheritor in other case;{RegExp|String|Number} [spec]
– error specifier; can be a string (Terror code name), number (Terror code) or RegExp (used for message test).If second argument is not a constructor (function), then helper recognize it as an specifier arg spec
.
FAQs
nodules-specific assertion helpers for chai
The npm package chai-nodules-helpers receives a total of 1 weekly downloads. As such, chai-nodules-helpers popularity was classified as not popular.
We found that chai-nodules-helpers demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.