4.2.1 • Published 9 years ago
apemanstore v4.2.1
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
create() -> Apemanstore
Create a store instance
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.
Links
4.2.1
9 years ago
4.2.0
9 years ago
4.1.1
9 years ago
4.1.0
9 years ago
4.0.1
9 years ago
4.0.0
9 years ago
3.0.0
9 years ago
2.0.0
9 years ago
1.7.3
10 years ago
1.7.2
10 years ago
1.7.1
10 years ago
1.7.0
10 years ago
1.6.1
10 years ago
1.6.0
10 years ago
1.5.0
10 years ago
1.4.0
10 years ago
1.3.0
10 years ago
1.2.1
10 years ago
1.2.0
10 years ago
1.0.0
10 years ago