
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.
keys-diff is a javascript/node.js module that provides a tool for finding the difference between the keys of two objects.
NOTE: This module verifies just the identity of the objects keys, not the whole structure. For full investigation, you can use modules like deep-diff.
Using npm:
$ npm install keys-diff
Or using yarn:
yarn add keys-diff
import keysDiff from 'keys-diff'
const foo = {
foo: 'foo',
bar: {
baz: 'baz',
qux: 'qux'
}
};
const bar = {
foo: 'foo',
bar: {
baz: 'baz',
quux: 'quux'
},
corge: 'corge'
};
keysDiff(foo, bar);
/* =>
[
[
[ 'bar', 'qux' ]
],
[
[ 'bar', 'quux' ],
[ 'corge' ]
]
]
*/
NOTE: Function receives two objects as arguments and returns a multidimensional array. First element of the returned array includes all the keys (in a form of array describing the full path in depth) from the first object that are not included the second object. In its turn, second element of the returned array includes all the keys from the second object that are not included in the first one.
I needed a similar tool when I came across an issue, where I needed to track the difference between two JSON files with l18n data from different branches. Could also be used to see the difference in API response structure, schemas and so on.
FAQs
Finds difference between the kyes of two objects
The npm package keys-diff receives a total of 1,477 weekly downloads. As such, keys-diff popularity was classified as popular.
We found that keys-diff 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.