2.6.7 • Published 10 months ago
deadjson v2.6.7
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 });
Function | Description |
---|---|
add | to add data to your json file |
delete | to get element and delete it |
get | to get element and his value |
save | save your data in to your file |
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