
Security News
Rust RFC Proposes a Security Tab on crates.io for RustSec Advisories
Rust’s crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.
(c)Bumblehead, 2013 MIT-license
compareobj is a script for comparing javascript objects. To my knowledge, it is most useful for writing unit tests and for comparing static json files that would used for web applications.
compareobj may be downloaded directly or installed through npm.
$ npm install compareobj
$ git clone https://github.com/iambumblehead/compareobj.git
to run tests, use npm test from a shell.
$ npm test
compare two objects to see if they have definition for the same members
var CompareObj = require('../compareobj');
CompareObj.isSameMembersDefinedObj({
prop1 : true,
prop2 : {
prop2a : {
prop2a1 : true
}
}
}, {
prop1 : true,
prop2 : {
prop2a : {}
}
}); // false
> ```javascript
var CompareObj = require('../compareobj');
CompareObj.isSameMembersDefinedObj({
prop1 : true,
prop2 : {
prop2a : {
prop2a1 : true
}
}
}, {
prop1 : true,
prop2 : {
prop2a : {
prop2a1 : true
}
}
}); // true
isSameMembers will also accept a callback
var CompareObj = require('../compareobj');
CompareObj.isSameMembersDefinedSameObj({
prop1 : true,
prop2 : {
prop2a : {
prop2a1 : true,
prop2a2 : true
}
}
}, {
prop1 : true,
prop2 : {
prop2a : {}
}
}, function (type, propertyName) {
console.log(type, propertyName);
});
// child prop2
// property prop2a2
compare two objects to see if they have the _same_ definition for the given members of the first object.
> ```javascript
var CompareObj = require('../compareobj');
CompareObj.isSameMembersDefinedObj({
prop1 : true,
prop2 : {
prop2a : {
prop2a1 : true
}
}
}, {
prop1 : true,
prop2 : {
prop2a : {
prop2a1 : true
}
}
}); // true
var CompareObj = require('../compareobj');
CompareObj.isSameMembersDefinedObj({
prop1 : true,
prop2 : {
prop2a : {
prop2a1 : true
}
}
}, {
prop1 : true,
prop2 : {
prop2a : {
prop2a1 : false
}
}
}); // false
---------------------------------------------------------
#### <a id="license">License:
(The MIT License)
Copyright (c) 2013 [Bumblehead][0] <chris@bumblehead.com>
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
Compare objects or json strings.
The npm package compareobj receives a total of 5 weekly downloads. As such, compareobj popularity was classified as not popular.
We found that compareobj 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
Rust’s crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.

Security News
/Research
Socket found a Rust typosquat (finch-rust) that loads sha-rust to steal credentials, using impersonation and an unpinned dependency to auto-deliver updates.

Research
/Security Fundamentals
A pair of typosquatted Go packages posing as Google’s UUID library quietly turn helper functions into encrypted exfiltration channels to a paste site, putting developer and CI data at risk.