Normal Programming Mistake

    datx-keyvalue
    TypeScript icon, indicating that this package has built-in type declarations

    1.1.0 • Public • Published

    datx-keyalue

    Greenkeeper badge Build Status npm version

    DatX is an opinionated data store for use with the MobX 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

    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

    Install

    npm i datx-keyvalue

    DownloadsWeekly Downloads

    5

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    277 kB

    Total Files

    110

    Last publish

    Collaborators

    • andreicek