1.0.6 • Published 7 years ago
apjson v1.0.6
why?
install
npm install apjson
how to use?
const Apjson = require("apjson");
const jsonFile = new Apjson("example.json");
jsonFile.append({title: "hello, world"});
jsonFile.append({
title: "test1",
time: "20:49",
});
jsonFile.close();
new Apjson(path, space)
parameter | type | default |
---|---|---|
path | string | null |
space | number | 2 |
Apjson.prototype.append(item)
parameter | type |
---|---|
item | object |
append stringified object
Apjson.prototype.close()
when you are not adding more, close the writable stream.