eejson
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

ezyjson

ezyjson is a JavaScript library made for help you for write and read in JSON.


How to use it?

ezyjson is the easier library for do this. ezyjson have a simple class and some cool function.

For use ezyjson, import the json class from the ezyjson folder.

const { json } = require("ezyjson");

For get the content of a file, you need to make:

let ezyjson = new json({
    filePath: "path to the file as a string",
    returnErrors: true // or false if you don't want that ezyjson returns all errors.
});

ezyjson.getContent()

The function returns the content. For get it in console, just put it in a console.log

let ezyjson = new json({
    filePath: "path to the file as a string",
    returnErrors: true // or false if you don't want that ezyjson returns all errors.
});

console.log(ezyjson.getContent()); // Log all of the content of the file.

Is there another functions?

Yeah! There is another functions and some cool functions!

ezyjson.watch({
    interval: 2000, // The time in milliseconds
    persistent: true, // Define if the function is call all the time.
});

ezyjson.deleteFolder("path to folder"); // or name of the folder if the folder is in the same folder that the file.

ezyjson.addKey("key name" /* String */, "the value of the key"); // String, Number of Boolean.

Readme

Keywords

none

Package Sidebar

Install

npm i eejson

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

8.8 kB

Total Files

5

Last publish

Collaborators

  • skkyz3r