
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A little utility for testing equality
sudo npm install equality
git clone git://github.com/apeace/equality.git
cd equality
sudo npm install
vows test/* --spec
var equality = require( 'equality' );
// deep
var A = { a: { b: 'c' }, d: { e: 'f' } },
B = { a: { b: 'c' }, d: { e: 'f' } },
C = { x: 10, y: { e: 'f' } };
equality.deep( A, B ); // ==> true
equality.deep( B, C ); // ==> false
equality.deep( A.d, C.y ); // ==> true
// deeper!
var X = { a: A, b: B, c: C },
Y = { a: A, b: B, c: C },
Z = { a: C, b: A, c: B };
equality.deep( X, Y ); // ==> true
equality.deep( Y, Z ); // ==> false
equality.deep( Y.b, Z.c ); // ==> true
// whoa...
var D = [ 1, 2, 3, 1 ],
E = [ 1, 1, 3, 2 ],
F = [ 6, 7, 8 ];
equality.members( D, E ); // ==> true
equality.members( E, F ); // ==> false
deep( obj1, obj2 ) tests for deep equality between two objectsmembers( arr1, arr2 ) tests whether two arrays have the same members, regardless of orderhash( obj ) returns a hash string that uniquely identifies the given object (based on its value)type( obj1, obj2 ) tests whether the two objects have the same typeJust released this real quick because I wanted it for a project. Planning on adding some more interesting methods and lots more tests. Feel free to pull request, of course.
Copyright (c) 2011 Andrew Peace
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
A little utility for testing equality
We found that equality 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.