1.1.5 • Published 4 years ago

alidb v1.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Build Status

AliDB

A Key-Value Pair script to save some data in a file as Json and get it back later.

Installation

npm i alidb

Usage

import AliDB from 'alidb'

const db = new AliDB()

// Give it a name.
db.init('MyDB')

// Put any type of data.
db.put('Name', 'Ali')
db.put('MyObj', { a: 'x', b: 'y' })

// Get the data back.
console.log( db.get('Name') )

// Erase DB content.
db.erase()

// Get all data as JSON.
console.log( db.getDBData() )

// Get all IDs.
console.log( db.getAllItems() )

Note

This package is for experience and for fun; not meant for real usage.

License

MIT

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago