2.6.7 • Published 2 years 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
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
3 years ago
2.2.3
3 years ago
2.2.2
3 years ago
2.5.2
3 years ago
2.5.1
3 years ago
2.5.3
3 years ago
2.0.1
3 years ago
2.0.0
3 years ago
1.1.4
3 years ago
1.1.3
3 years ago
1.1.2
3 years ago
1.1.1
3 years ago
1.1.0
3 years ago
1.0.0
3 years ago