README
apemanstore
Flux store for apeman
Installation
$ npm install apemanstore --save
Usage
'use strict'
const apemanstore = require('apemanstore')
{
let store = apemanstore()
store.set('foo', 'bar')
console.log(store.get('foo')) // -> foo
}
API
apemanstore@4.2.1
Flux store for apeman
- Functions
- Apemanstore Class
- new Apemanstore(state, options)
- apemanstore.set(field, value)
- apemanstore.update(field, value)
- apemanstore.del(field, value)
- apemanstore.push(field, value)
- apemanstore.pushAll(field, value)
- apemanstore.pop(field, value)
- apemanstore.shift(field, value)
- apemanstore.popAll(field, value)
- apemanstore.reject(field, value)
- apemanstore.flip(field, value)
- apemanstore.increment(field, value)
- apemanstore.decrement(field, value)
Functions
Apemanstore
create() ->
reducer(state, action)
Reducer for apemanstore
Param | Type | Description |
---|---|---|
state | Object | State object |
action | Object | Redux action object |
Apemanstore Class
new Apemanstore(state, options)
Constructor of Apemanstore class
Param | Type | Description |
---|---|---|
state | Object | Preloaded state variables |
options | Object | Optional settings |
apemanstore.set(field, value)
Set a value on field
Param | Type | Description |
---|---|---|
field | string | |
value | * |
apemanstore.update(field, value)
Do update operation
Param | Type | Description |
---|---|---|
field | string | Operation target field |
value | * | Operation value |
apemanstore.del(field, value)
Do del operation
Param | Type | Description |
---|---|---|
field | string | Operation target field |
value | * | Operation value |
apemanstore.push(field, value)
Do push operation
Param | Type | Description |
---|---|---|
field | string | Operation target field |
value | * | Operation value |
apemanstore.pushAll(field, value)
Do push_all operation
Param | Type | Description |
---|---|---|
field | string | Operation target field |
value | * | Operation value |
apemanstore.pop(field, value)
Do pop operation
Param | Type | Description |
---|---|---|
field | string | Operation target field |
value | * | Operation value |
apemanstore.shift(field, value)
Do shift operation
Param | Type | Description |
---|---|---|
field | string | Operation target field |
value | * | Operation value |
apemanstore.popAll(field, value)
Do pop_all operation
Param | Type | Description |
---|---|---|
field | string | Operation target field |
value | * | Operation value |
apemanstore.reject(field, value)
Do reject operation
Param | Type | Description |
---|---|---|
field | string | Operation target field |
value | * | Operation value |
apemanstore.flip(field, value)
Do flip operation
Param | Type | Description |
---|---|---|
field | string | Operation target field |
value | boolean | Operation value |
apemanstore.increment(field, value)
Do increment operation
Param | Type | Description |
---|---|---|
field | string | Operation target field |
value | number | Operation value |
apemanstore.decrement(field, value)
Do decrement operation
Param | Type | Description |
---|---|---|
field | string | Operation target field |
value | number | Operation value |
License
This software is released under the MIT License.