
Research
/Security News
Intercom’s npm Package Compromised in Ongoing Mini Shai-Hulud Worm Attack
Compromised intercom-client@7.0.4 npm package is tied to the ongoing Mini Shai-Hulud worm attack targeting developer and CI/CD secrets.
assert-json-equal
Advanced tools
assert.deepStrictEqual for JSON object.
assert-json-equal provide a assertJsonEqual function.
assert.deepStrictEqual discriminate undefined value and missing property.
const a = {};
const b = {
undef: undefined
};
assert.throws(() => {
assert.deepStrictEqual(a, b); // => throw
});
assertJsonEqual does not discriminate undefined value and missing property.
It is useful for comparing JSON objects.
import { assertJsonEqual } from "assert-json-equal"
const a = {};
const b = {
undef: undefined
};
assertJsonEqual(a, b); // => pass
Install with npm:
npm install assert-json-equal
/**
* `assert.deepStrictEqual` for JSON object.
* Same API with `assert.deepStrictEqual(a, b, [message])`
*/
export declare const assertJsonEqual: (actual: any, expected: any, message?: string | Error | undefined) => void;
Serialize and Deserialize object with JSON before compare objects with assert.deepStrictEqual.
import assert from "assert";
const normalizeJSON = <T extends any>(json: T) => {
return JSON.parse(JSON.stringify(json));
};
/**
* `assert.deepStrictEqual` for JSON object.
* Same API with `assert.deepStrictEqual(a, b, [message])`
* @param actual
* @param expected
* @param message
*/
export const assertJsonEqual = (actual: any, expected: any, message?: string | Error) => {
assert.deepStrictEqual(normalizeJSON(actual), normalizeJSON(expected), message);
}
See Releases page.
Install devDependencies and Run npm test:
npm test
Pull requests and stars are always welcome.
For bugs and feature requests, please create an issue.
git checkout -b my-new-featuregit commit -am 'Add some feature'git push origin my-new-featureMIT © azu
FAQs
assert.deepStrictEqual for JSON object.
The npm package assert-json-equal receives a total of 573 weekly downloads. As such, assert-json-equal popularity was classified as not popular.
We found that assert-json-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.

Research
/Security News
Compromised intercom-client@7.0.4 npm package is tied to the ongoing Mini Shai-Hulud worm attack targeting developer and CI/CD secrets.

Research
Socket detected a malicious supply chain attack on PyPI package lightning versions 2.6.2 and 2.6.3, which execute credential-stealing malware on import.

Research
A brand-squatted TanStack npm package used postinstall scripts to steal .env files and exfiltrate developer secrets to an attacker-controlled endpoint.