2.6.7 • Published 2 years ago

deadjson v2.6.7

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Typing SVG


DeadJson

setup:-

const DeadJson = require("deadjson").default;
const file = require("your path of file here");
const data = new DeadJson("your path of file here", file);

add():-

data.add("key here", { data: any });
  • example
    data.add("deadjson", ["hello!", 4, { hi: "hi" }]);

delete():-

data.delete("key");
  • example
    // json file
    /*
      {
        "json": "json"
      }
    */
    data.delete("json");

get():-

data.get()["your keys of json here"];
  • example
    // json file
    /*
      {
        "json": "json"
      }
    */
    data.get().json; // json

save():-

data.save({ spaces: [number] });
  • example
    // to edit text
    data.add("json", "json").save({ spaces: 2 });
    // to add into object
    data.add("json", { ...data.get().json, value }).save({ spaces: 2 });
    // to add into array
    data.add("json", [...data.get().json, value]).save({ spaces: 2 });

FunctionDescription
addto add data to your json file
deleteto get element and delete it
getto get element and his value
savesave your data in to your file

Typing SVG

2.5.6

2 years ago

2.5.5

2 years ago

2.6.7

2 years ago

2.6.6

2 years ago

2.5.4

2 years ago

2.0.2

2 years ago

2.2.3

2 years ago

2.2.2

2 years ago

2.5.2

2 years ago

2.5.1

2 years ago

2.5.3

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago