# @ashikuri/table-db

> lite file db

Latest version **0.5.3** (published 2021-09-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install @ashikuri/table-db
pnpm add @ashikuri/table-db
yarn add @ashikuri/table-db
bun add @ashikuri/table-db
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.3 |
| Published | 2021-09-01 |
| First published | 2021-06-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 488.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | ashikuri |
| Maintainers | ashikuri |

## Links

- npm: https://www.npmjs.com/package/@ashikuri/table-db
- npm.io page: https://npm.io/package/@ashikuri/table-db

## Dependencies (3)

- [localforage](https://npm.io/package/localforage.md) ^1.10.0
- [lodash.isequal](https://npm.io/package/lodash.isequal.md) ^4.5.0
- [lodash.orderby](https://npm.io/package/lodash.orderby.md) ^4.6.0

## Recent versions

- 0.5.3 (latest) — 2021-09-01
- 0.5.2 — 2021-09-01
- 0.5.1 — 2021-09-01
- 0.5.0 — 2021-09-01
- 0.4.1 — 2021-07-08
- 0.4.0 — 2021-07-07
- 0.3.2 — 2021-07-03
- 0.3.1 — 2021-07-03
- 0.3.0 — 2021-07-03
- 0.2.0 — 2021-06-30
- 0.1.3 — 2021-06-30
- 0.1.2 — 2021-06-30
- 0.1.1 — 2021-06-30
- 0.1.0 — 2021-06-29

## README

# table-db

> Tiny database interfacer 🐜

## Install
```sh
$ npm i @ashikuri/table-db
or
$ yarn add @ashikuri/table-db
```

## Usage

```js
import TableApp from "@ashikuri/table-db"
import { JSONAdapter } from "@ashikuri/table-db/adapters"

async function application(){
    const db = new TableApp("./database.json", JSONAdapter)
    const users = await db.collection("users")

    // return users
    await users.insert({
        id: 0,
        name: "John Doe",
        email: "john@doe.com",
        online: true
    }, {
        id: 1,
        name: "John Doe 2",
        email: "john2@doe.com",
        online: false
    })
    // ...
    // note: Collection.save is an alias as db.save
    await users.save() // or db.save() or db.write()
}
application()
```

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