1.0.1 • Published 2 years ago
@extremelyclever/lightjson v1.0.1
LightJSON
LightJSON is a database which saves data in JSONs and is very lightweight! It is super easy to get started. First install LightJSON through the command line like so:
npm i @extremelyclever/lightjson
Then, require it:
const lightjson = require("@extremelyclever/lightjson");
Then, create a collection called info (or whatever you want!):
const {whateverYouWant} = new lightjson.Collection("whateverYouWant");
You will see two brand new JSON files. One will be named what you put in the new lightjson.Collection("whateverYouWant")
and another the name of the first file with "id" at the end. Next, get everything in the JSON file like so:
console.log({whateverYouNamedTheObject}.get());