@nuware/store

0.3.1 • Public • Published

Store

Install

npm install @nuware/store --save

or

<script defer src="https://unpkg.com/@nuware/store@latest/dist/store.umd.js"></script>

or

<script defer src="https://unpkg.com/@nuware/store@latest/dist/store.min.js"></script>

Usage

Browser

const Store = window.nuware.Store

Node

const Store = require('@nuware/store')

or

import Store from '@nuware/store'

Initialize Store

const store = Store({
  any: {
    initial: {
      state: true
    }
  }
})

API

Store

Factory function return the Store instance. You can pass the initial state of this Store.

store

Store instance.

store.ref()

store.VALUE_EVENT

store.CHILD_ADDED_EVENT

store.CHILD_CHANGED_EVENT

store.CHILD_REMOVED_EVENT

ref

ref.child()

ref.parent()

ref.get()

ref.set()

ref.remove()

ref.on()

ref.off()

Authors

License

Readme

Keywords

none

Package Sidebar

Install

npm i @nuware/store

Weekly Downloads

0

Version

0.3.1

License

MIT

Unpacked Size

32.6 kB

Total Files

7

Last publish

Collaborators

  • outbreak