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.
simple-object-to-json-cacher
Advanced tools
Saves JS Object synchronously to plain text JSON file, and loads. (Basic Simple Unencrypted Serialisation)
Saves JS Object synchronously to plain text JSON file, and loads. (Basic Simple Unencrypted Serialisation)
Declare a path to the folder where the cache will be stored. If the folder exists it will be used, if the last folder in the path does not exist it will be created.
let CACHEFOLDERPATH = "./example/folderForCachedObjects";
Create a Cacher object:
let cacher = Cacher(CACHEFOLDERPATH);
To save an object, call the save function of the Cacher object and provide the name of the file to save to without the JSON extension and the object as the second argument. The file will be saved in the Cache directory given as in the example above as CACHEFOLDERPATH. If the file already exists it will be replaced with the contents of the object.
cacher.save("cachedObject", exampleObjectToSave);
To restore and load an object, call the load function on the Cacher object and provide the name of the file to restore the object from without the JSON extension.
let loadedCachedObject = cacher.load("cachedObject");
console.log(loadedCachedObject);
FAQs
Saves JS Object synchronously to plain text JSON file, and loads. (Basic Simple Unencrypted Serialisation)
The npm package simple-object-to-json-cacher receives a total of 23 weekly downloads. As such, simple-object-to-json-cacher popularity was classified as not popular.
We found that simple-object-to-json-cacher 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.