
Security Fundamentals
Obfuscation 101: Unmasking the Tricks Behind Malicious Code
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.
Are these two values conceptually equal?
var isEqual = require('is-equal');
var assert = require('assert');
var primitives = [true, false, undefined, 42, 'foo'];
primitives.forEach(function (primitive) {
assert.equal(isEqual(primitive, primitive), true);
});
assert.equal(isEqual(/a/g, /a/g), true);
assert.equal(isEqual(/a/g, new RegExp('a', 'g')), true);
assert.equal(isEqual({ a: 2 }, { a: 2 }), true);
assert.equal(isEqual([1, [2, 3], 4], [1, [2, 3], 4]), true);
var timestamp = Date.now();
assert.equal(isEqual(new Date(timestamp), new Date(timestamp)), true);
Will return an empty string if isEqual
would return true
- otherwise will return a non-empty string that hopefully explains the reasoning.
var whyNotEqual = require('is-equal/why');
assert.equal(whyNotEqual(1, 1), '');
assert.equal(
whyNotEqual({ a: 1 }, { a: 2 }),
'value at key "a" differs: numbers are different: 1 !== 2'
);
Simply clone the repo, npm install
, and run npm test
v1.6.3 - 2021-08-06
c6b6672
is-bigint
, is-boolean-object
, is-callable
, is-date-object
, is-generator-function
, is-number-object
, is-regex
, is-string
, is-symbol
, object-inspect
, object.entries
a3b5498
tape
v5.3 exposed a bug in corejs tests; use --require
instead a1e004e
has-symbols/shams
and has-bigints
to more robustly detect these things 4f3aee4
auto-changelog
, core-js
, eslint
, tape
d6a7b8e
04ce4d0
FAQs
Are these two values conceptually equal?
The npm package is-equal receives a total of 71,816 weekly downloads. As such, is-equal popularity was classified as popular.
We found that is-equal 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 Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.
Security News
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.
Security News
Biome's v2.0 beta introduces custom plugins, domain-specific linting, and type-aware rules while laying groundwork for HTML support and embedded language features in 2025.