
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
dbj.cond.comparators
Advanced tools
deep dbj.cond.comparators 'arr' and 'lookup'. Can be used with dbj.cond
(c) 2009-2018 .. and beyond, by dbj.org
Licensed under the Apache License 2.0
dbj Comparators to be used either standalone or with dbj.cond
The purpose of this comparators is functionality not speed. They are most usefull when used with dbj.cond, or some such mechanism for complex conditional programing made feasible.
The API
npm install dbj.cond.comparators
require("dbj.cond.comparators");
// after this we have dbj.compare available
// standard strict equaility (aka '===')
// returns true
dbj.compare.standard(42,42);
// arrays comparison
// is comparator argument is provided it is deep
// otherwise it is shallow "===" comparison
// for array elements comparing
// returns true
dbj.compare.arr([42],[42]);
// transforms both arguments to arrays
// returns true
dbj.compare.arr( 42 , 42 );
// two way lookup comparison
// if comparator argument is provided it is deep
// otherwise it is shallow "===" comparison
// returns false
dbj.compare.lookup( [42], [42]);
// returns true
dbj.compare.lookup( 42, 42);
// secondary comparator may be given
// to both 'arr' and 'lookup'
// it is used for deep comparisons
// it can be passed direct as third argument or factory
// method 'make' might be used as a better option
const fdeq = require('fast-deep-equal');
const arr = dbj.compare.make('arr', fdeq) ;
// returns true
arr([[42]],[[42]]);
// returns true
// arguments are transformed to arrays
arr({a:42},{a:42});
//
const lookup = dbj.compare.make('lookup', fdeq );
// returns true
lookup([1,2,3], 2);
// also returns true
lookup([1,{a:2},3], {a:2})
//
For overview and usage with dbj.cond, please go to the short online manual on the GitHub project.
For testing project please go straight to dbj.cond.test on GitHub.
Please do feel free to send us your code and comments. We might publish it and discuss it on dbj.org site.
NOTE
Please do not hesitate to ask for a suport by mailing info@dbj.org
FAQs
deep dbj.cond.comparators 'arr' and 'lookup'. Can be used with dbj.cond
We found that dbj.cond.comparators 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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.