
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
Package which processes objects to reuse existing references when those are unchanged
This package processes objects to reuse existing references when those are unchanged. It is useful when the data producer provides a new object for each update but the data consumer relies on shallow testing for optimization, such as React's memo function.
It has support for the following objects:
ArrayObject (including objects with a null prototype)Map (reusing the value only as it is impossible to tell which key was which)DateRegExpURLIn the case of partial reuse, the new object provided as input is not used but a copy is created instead.
$ npm install obj-reuse
import reuse from 'obj-reuse';
let old = {
foo: [5, 6],
bar: 7
};
let updated = {
foo: [5, 6],
bar: 8
};
let result = reuse(updated, old);
// Here 'updated.foo' was left unchanged and thus reused, meaning 'result.foo === old.foo'
let result = reuse(updated, old, (updated, old) => {
// Logic for custom reuse
// ...
// By default, skip reuse entirely
return updated;
});
FAQs
Package which processes objects to reuse existing references when those are unchanged
We found that obj-reuse 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 Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.