turbo.db

    0.0.3 • Public • Published

    turbo.db

    • A very lightweight and simple JSON based database

    Badge Badge Badge Badge Badge

    • Note: This package wont work below Node.js v12.x

    usage

    let turbo = require('turbo.db');
    let database = new turbo("database.json");
     
    database.set("gender", "male");
     
    let result = database.get("gender")
    console.log(result); //returns male
    let turbo = require('turbo.db');
    let database = new turbo("database.json");
     
    database.set("fruit", "mango");
    database.set("ball", "circle");
     
    let result = database.all()
    console.log(result); //{"fruit":"mango", "ball":"circle"}
    let turbo = require('turbo.db');
    let database = new turbo("database.json");
     
    database.set("gender", "male");
     
    let clear = database.nuke()
    console.log(clear); //returns {}
    let turbo = require('turbo.db');
    let database = new turbo("database.json");
     
    database.set("gender", "male");
     
    let result = database.delete("gender")
    console.log(result); //returns true

    Install

    npm i turbo.db

    DownloadsWeekly Downloads

    2

    Version

    0.0.3

    License

    none

    Unpacked Size

    4.4 kB

    Total Files

    4

    Last publish

    Collaborators

    • epoxydevelopment