
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
object-observable-lite
Advanced tools
Observe object changes deeply without cloning in an efficient manner.
Observe object changes deeply without cloning in an efficient manner.
The package must observe deeply. The package must not clone the nested objects. The package must handle all types. The package should attempt to minimize overhead
Returned changes are not cloned. Instances and therefore will mutate as the observed object mutates
This is a derivative of object-observable with many of the features striped for improved performance.
Several similar packages were tested which resulted in this package being created. The comparison of these packages can be seen here.
const objectObservableLite = require('object-observable-lite');
const obj = testObj = {
x: 1,
foo: {
y: 1,
},
bar: ['a', { b: 'b' }],
today: new Date(),
};
const watchedObject = objectObservableLite(obj, (change) => {
console.log(change)
});
watchedObject.x = 2;
The comparison of other packages suggests there is still room for improvement in the overall efficiency of this package.
Other packages will have to be more deeply analyzed to determine how this package could be improved.
Pull request are welcome.
FAQs
Observe object changes deeply without cloning in an efficient manner.
The npm package object-observable-lite receives a total of 10 weekly downloads. As such, object-observable-lite popularity was classified as not popular.
We found that object-observable-lite 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.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.