fv-store

1.0.11 • Public • Published

FV Store

Fast and simple key = value storage

Installation

npm install --save fv-store

Usage

import Store from "fv-store";

Store.set({
    user: {
        firstName: 'James',
        lastName: 'Craig'
    }
});

console.log(Store.get('user.firstName', 'defaultValue'));

Subscriptions

Subscriptions are a way of listening for events on the store.

const subscription = Store.subscribe('update', store => {
    console.log(store);
});

// If you are running a single page application, make sure you unsubscribe
// from an event when you are finished with it.
Store.unsubscribe(subscription);

Package Sidebar

Install

npm i fv-store

Weekly Downloads

2

Version

1.0.11

License

MIT

Last publish

Collaborators

  • finervision