# datx-keyvalue

> DatX mixin for key value store

Latest version **1.1.0** (published 2018-05-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install datx-keyvalue
pnpm add datx-keyvalue
yarn add datx-keyvalue
bun add datx-keyvalue
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2018-05-14 |
| First published | 2018-05-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 270.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Andrei Zvonimir Crnkovic |
| Maintainers | andreicek |
| Keywords | datx, mobx, jsonapi |

## Links

- npm: https://www.npmjs.com/package/datx-keyvalue
- Repository: https://github.com/andreicek/datx-keyvalue
- Homepage: https://github.com/andreicek/datx-keyvalue#readme
- Issues: https://github.com/andreicek/datx-keyvalue/issues
- npm.io page: https://npm.io/package/datx-keyvalue

## Dependencies (2)

- [datx](https://npm.io/package/datx.md) ^0.11.1
- [datx-utils](https://npm.io/package/datx-utils.md) ^0.11.0

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.1.0 (latest) — 2018-05-14
- 1.0.0 — 2018-05-13

## README

# datx-keyalue

[![Greenkeeper badge](https://badges.greenkeeper.io/andreicek/datx-keyvalue.svg)](https://greenkeeper.io/)
[![Build Status](https://travis-ci.org/andreicek/datx-keyvalue.svg?branch=master)](https://travis-ci.org/andreicek/datx-keyvalue)
[![npm version](https://badge.fury.io/js/datx-keyvalue.svg)](https://badge.fury.io/js/datx-keyvalue)

DatX is an opinionated data store for use with the [MobX](https://mobx.js.org/) state management library. It features support for simple observable property definition, references to other models and first-class TypeScript support.

`datx-keyvalue` is a datx mixin that adds key value store support.

***

## Basic usage

```typescript
import { Collection } from 'datx';
import { keyValue, KeyValue } from 'datx-keyvalue';

class AppData extends keyValue(Collection) {
  public static types = [KeyValue];
}

const appData = new AppData();

appData.keyValues.add('currentUserId', 1);
console.log(appData.keyValues.get('currentUserId')); // => 1
```

## License

The [MIT License](LICENSE)

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