Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
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)
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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.