
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
chai-shallow-deep-equal
Advanced tools
Will shallowly perform a deep equal assertion. In other terms is consist of checking that an object, or objects graph, is contained within another one (see examples bellow).
<script src="chai.js"></script>
<script src="chai-shallow-deep-equal.js"></script>
var chai = require('chai');
chai.use(require('chai-shallow-deep-equal'));
ShallowDeepEqual is available for all chai assertion styles:
var a = {name: 'Michel', language: 'javascript'};
var b = {name: 'Michel'};
a.should.shallowDeepEqual(b);
expect(a).to.shallowDeepEqual(b);
assert.shallowDeepEqual(a, b);
assert.shallowDeepEqual({name: 'Michel', language: 'javascript'}, {name: 'Michel'}); // true
assert.shallowDeepEqual({
name: 'Michel',
language: 'javascript',
tags: [
'developer',
'gamer'
]},
{
name: 'Michel',
tags: [
'developer'
]}); // true
assert.shallowDeepEqual([
{brand: 'apple', color: 'red'},
{brand: 'samsung', color: 'blue'},
],
{
length: 2,
0: {color: 'red'},
1: {brand: 'samsung'},
}); // true
assert.shallowDeepEqual({
name: 'Michel',
age: undefined
},
{
name: 'Michel',
age: 37
}); // false (age should not be defined)
FAQs
Shallow deep equal assertion for chai
The npm package chai-shallow-deep-equal receives a total of 54,189 weekly downloads. As such, chai-shallow-deep-equal popularity was classified as popular.
We found that chai-shallow-deep-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 News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.