
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
A module that saves and loads json data from a file. You can also modify the object loaded.
> npm install --save jsondata
In order to declare JsonData, you need to
var JsonData = require("jsondata");
var jsondata = new JsonData();
There are 4 methods available:
And to get the data loaded, it is simply
jsondata.data // object that is jsondata
Loads data from a file
jsondata.load(/** filename **/, function(error, obj){
if (err) throw err;
assert(jsondata.data, obj); // obj is the loaded object
});
Adds an object to jsondata.data
jsondata.add(/** object to add to jsondata.data **/, function(){
/** jsondata.data has been modified **/
});
Removes a key from the object that is jsondata.data
jsondata.remove(/** key to be removed **/, function(){
/** jsondata.data has been modified **/
});
Saves object to a file
jsondata.save(/** filename **/, function(error, str){
if (err) throw err;
assert(JSON.stringify(jsondata.data), str); // str is the stringify version of the data that was saved into the file
});
1.1.0
1.0.1
1.0.0
FAQs
A module that saves and loads json data from a file
The npm package jsondata receives a total of 1 weekly downloads. As such, jsondata popularity was classified as not popular.
We found that jsondata 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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.