Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
gold-json-pointer
Advanced tools
Here is a solid json-pointer implementation. The main differences to this implementation are
This json-pointer implementation will return undefined
if the pointer could not be resolved, which allows checks like
if (pointer.get(data, "#/path/to/nested/item") {...}
instead of
if (path && path.to && path.to.nested ...
.
This library exposes
npm i gold-json-pointer
var data = {
parent: {
child: {
title: "title of child"
}
}
}
var titleOfChild = pointer.get(data, "#/parent/child/title"); // "title of child"
set values on an object
var data = {
parent: {
children: [
{
title: "title of child"
}
]
}
};
pointer.set(data, "#/parent/children/1", {title: "second child"});
console.log(data.parent.children.length); // 2
delete properties or array items
pointer.delete(data, "#/parent/arrayOrObject/1");
pointer.join
joins all arguments to a valid json pointer:
var key = "child";
var target = pointer.join("parent", key, "title"); // "#/parent/child/title"
FAQs
json pointer - failsafe data retrieval on js or json objects
We found that gold-json-pointer 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.