# doraemondb

> key-value based storage

Latest version **1.0.2** (published 2020-12-31) · ISC license · 0 weekly downloads

## Install

```sh
npm install doraemondb
pnpm add doraemondb
yarn add doraemondb
bun add doraemondb
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-12-31 |
| First published | 2020-12-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | ranjitkshah |
| Maintainers | ranjitkshah |

## Links

- npm: https://www.npmjs.com/package/doraemondb
- Repository: https://github.com/ranjitkshah/DoraemonDb
- Homepage: https://github.com/ranjitkshah/DoraemonDb#readme
- Issues: https://github.com/ranjitkshah/DoraemonDb/issues
- npm.io page: https://npm.io/package/doraemondb

## Dependencies (1)

- [user](https://npm.io/package/user.md) 0.0.0

## Recent versions

- 1.0.2 (latest) — 2020-12-31
- 1.0.0 — 2020-12-31

## README

# doraemondb
 
<img src="https://img.shields.io/npm/v/doraemondb">

doraemondb is npm package meant for key-value storage in form of JSON and also has expiration property for keys.

## Features
- storing key-value data in form of JSON object
- expiration time for keys ( time to leave property )


## installation

Install doraemondb

```
npm i doraemondb
```


Create a new local storage instance or global instance for browser storage

## usage

- create db instance

`const doraemonDb = require('doraemondb');`
 
- create db json || args( key: string, value: string, TTL: number )
- ttl (time to leave) for key expiration in seconds or by default it is null ( doesn't check for expiration )

`doraemonDb('1','ranjit',5)` 

- read db || args (key: string) returns value of key

`doraemonDb.read('1')`

- has db || args (key: string) returns boolean

`doraemonDb.has('1')`

- all db || returns all data storage

`doraemonDb.all()`

- delete db ||  args (key: string) delete value of key

`doraemonDb.delete('1')`


<a href="https://www.npmjs.com/package/doraemondb">link</a>

---
_Source: https://npm.io/package/doraemondb · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
