
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
json-maker
Advanced tools
json-maker is an easy to use JSON making tool, with the ability to write JSON files and use the raw JSON object as a variable.
npm install json-maker
npm install --save json-maker
Optional: True
Returns: Nothing
options
Loads a JSON file on construction into the native JSON storage.
const _jsonMaker = require('json-maker');
const jsonMaker = new _jsonMaker('./kek9.json');
setTimeout(() => {
console.log(JSON.stringify(jsonMaker.json));
}, 1000);
Returns: JSON Object
Returns the raw JSON Object that was created using addField()
const _jsonMaker = require('json-maker');
const jsonMaker = new _jsonMaker();
console.log(JSON.stringify(jsonMaker.json));
Returns: Module
options
Adds a field to the JSON object with the specified title and data values.
const _jsonMaker = require('json-maker');
const jsonMaker = new _jsonMaker();
jsonMaker.addField('kek9', 'lul5');
console.log(JSON.stringify(jsonMaker.json));
Returns: Module
options
Allows you to delete a field based on the key title.
const _jsonMaker = require('json-maker');
const jsonMaker = new _jsonMaker();
jsonMaker.removeField('kek9');
console.log(JSON.stringify(jsonMaker.json));
Returns: Promise
options
Writes the JSON object in the package to a the specified file.
const _jsonMaker = require('json-maker');
const jsonMaker = new _jsonMaker();
jsonMaker.write('./kek.json').then(() => console.log('Wrote to file')).catch(err => console.error(err));
Returns: Promise
options
Loads the JSON object from the file specified.
const _jsonMaker = require('json-maker');
const jsonMaker = new _jsonMaker();
jsonMaker.load('./test.json').then(()=>{
console.log(JSON.stringify(jsonMaker.json));
});
Returns: Boolean
options
Returns a boolean depending on if the entry exists or not.
const _jsonMaker = require('json-maker');
const jsonMaker = new _jsonMaker();
console.log(jsonMaker.exists('kek9'));
Returns: null
Clears the JSON object in the package.
const _jsonMaker = require('json-maker');
const jsonMaker = new _jsonMaker();
jsonMaker.clear();
console.log(JSON.stringify(jsonMaker.json));
Returns: null
or Key Value
options
Allows you to get the value of a key from the JSON object.
const _jsonMaker = require('json-maker');
const jsonMaker = new _jsonMaker();
jsonMaker.addField('title-here', 'value-here');
console.log(jsonMaker.get('title-here'));
'Nuff said
Since this package will most likely become a class, it would be a part of the constructor.
Since this package will most likely become a class, it would be a part of the constructor.
FAQs
Allows for easy creation of JSON files
We found that json-maker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.