# easy-store

> Easy file system JSON storage

Latest version **0.1.3** (published 2017-04-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install easy-store
pnpm add easy-store
yarn add easy-store
bun add easy-store
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2017-04-21 |
| First published | 2017-04-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Gabe Scholz |
| Maintainers | garbles |

## Links

- npm: https://www.npmjs.com/package/easy-store
- Repository: https://github.com/garbles/easy-store
- npm.io page: https://npm.io/package/easy-store

## Dependencies (3)

- [chalk](https://npm.io/package/chalk.md) ^1.1.3
- [shortid](https://npm.io/package/shortid.md) ^2.2.8
- [json-fs-store](https://npm.io/package/json-fs-store.md) ^1.0.1

## Recent versions

- 0.1.3 (latest) — 2017-04-21
- 0.1.2 — 2017-04-21
- 0.1.1 — 2017-04-21
- 0.1.0 — 2017-04-21

## README

A simple storage mechanism for doing demos and stuff where you require some persistence. Saves JSON files to disk in your OS's temp directory. Only works in Node.

### Install

```
yarn add easy-store
```

### Use

```js
import store from 'easy-store';

const users = store('users');

await users.create({name: 'Fart', email: 'cooldude@example.com'});
/*
  {
    id: 'SJb2pWGOAe',
    name: 'Fart',
    email: 'cooldude@example.com',
    createdAt: 1492816324108,
    updatedAt: 1492816324108
  }
*/

await users.get('SJb2pWGOAe');
// { id: 'SJb2pWGOAe', ... }

await users.query()
// [{ id: 'SJb2pWGOAe', ... }]

await users.query(u => u.email === 'cooldude@example.com');
// [{ id: 'SJb2pWGOAe', ... }]

await users.update({id: 'SJb2pWGOAe', name: 'Next'});
// { id: 'SJb2pWGOAe', name: 'Next', ... }

await users.remove('SJb2pWGOAe')
// { id: 'SJb2pWGOAe' }
```

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