0.3.1 • Published 6 years ago

@nuware/store v0.3.1

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

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

0.3.1

6 years ago

0.3.0

7 years ago

0.2.5

7 years ago

0.2.4

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.11

7 years ago

0.1.10

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago