2.6.7 • Published 10 months ago

deadjson v2.6.7

Weekly downloads
-
License
ISC
Repository
github
Last release
10 months 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

10 months ago

2.5.5

10 months ago

2.6.7

10 months ago

2.6.6

10 months ago

2.5.4

10 months ago

2.0.2

1 year ago

2.2.3

1 year ago

2.2.2

1 year ago

2.5.2

1 year ago

2.5.1

1 year ago

2.5.3

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago