
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
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
The npm package json-maker receives a total of 7 weekly downloads. As such, json-maker popularity was classified as not popular.
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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.