
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.
deep-close-to
Advanced tools
Node's assert.deepEqual() but with configurable comparator.
The default comparator compares the absolute difference to be below an epsilon, suitable for floats.
var closeTo = require('deep-close-to');
console.dir([
closeTo(
{ a : [ 2, 3 ], b : [ 4 ] },
{ a : [ 2, 3 ], b : [ 4 ] }
),
closeTo(
{ x : 36/5, y : [6] },
{ x : 72/10, y : 6 }
)
]);
var closeTo = require('deep-close-to')
Compare objects a and b, returning whether they are equal according to a
recursive equality algorithm.
If opts.strict is true, use strict equality (===) to compare leaf nodes.
The default is to compare their absolute difference to be below 0.0000001.
Number.EPSILON was not used because numeric errors are often bigger than it.
With npm do:
npm install deep-close-to
With npm do:
npm test
MIT. Derived largely from substack's deep-equal.
FAQs
out of the box assert.deepCloseTo with configurable comparator
We found that deep-close-to 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.