Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

finer-vision/Store

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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);

About

Fast and simple key = value storage

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published