1.0.0 • Published 2 years ago

saturn-db v1.0.0

Weekly downloads
-
License
GPL-3.0-or-later
Repository
github
Last release
2 years ago

SaturnDB

Install

npm i saturn-db

Usage

Javascript

const Saturn = require('saturndb').Saturn
// or
import { Saturn } from 'saturndb'

const db = new Saturn('database.json')

Typescript

import { Saturn } from 'saturndb'
import type { ISaturn } from 'saturndb/types'

const db: ISaturn = new Saturn('database.json')

Setting data

db.set('table', 'Hello World!')

You can add Object or Array too

Getting data by table name

db.get('table') // 'Hello World!'

Getting all data

db.getAll() // {'table': 'Hello World!'}

Removing table

db.remove('table')