apemanstore

4.2.1 • Public • Published

apemanstore

Build Status npm Version JS Standard

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

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

Readme

Keywords

Package Sidebar

Install

npm i apemanstore

Weekly Downloads

3

Version

4.2.1

License

MIT

Last publish

Collaborators

  • okunishinishi