4.2.1 • Published 8 years ago

apemanstore v4.2.1

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

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

ParamTypeDescription
stateObjectState object
actionObjectRedux action object

Apemanstore Class

new Apemanstore(state, options)

Constructor of Apemanstore class

ParamTypeDescription
stateObjectPreloaded state variables
optionsObjectOptional settings

apemanstore.set(field, value)

Set a value on field

ParamTypeDescription
fieldstring
value*

apemanstore.update(field, value)

Do update operation

ParamTypeDescription
fieldstringOperation target field
value*Operation value

apemanstore.del(field, value)

Do del operation

ParamTypeDescription
fieldstringOperation target field
value*Operation value

apemanstore.push(field, value)

Do push operation

ParamTypeDescription
fieldstringOperation target field
value*Operation value

apemanstore.pushAll(field, value)

Do push_all operation

ParamTypeDescription
fieldstringOperation target field
value*Operation value

apemanstore.pop(field, value)

Do pop operation

ParamTypeDescription
fieldstringOperation target field
value*Operation value

apemanstore.shift(field, value)

Do shift operation

ParamTypeDescription
fieldstringOperation target field
value*Operation value

apemanstore.popAll(field, value)

Do pop_all operation

ParamTypeDescription
fieldstringOperation target field
value*Operation value

apemanstore.reject(field, value)

Do reject operation

ParamTypeDescription
fieldstringOperation target field
value*Operation value

apemanstore.flip(field, value)

Do flip operation

ParamTypeDescription
fieldstringOperation target field
valuebooleanOperation value

apemanstore.increment(field, value)

Do increment operation

ParamTypeDescription
fieldstringOperation target field
valuenumberOperation value

apemanstore.decrement(field, value)

Do decrement operation

ParamTypeDescription
fieldstringOperation target field
valuenumberOperation value

License

This software is released under the MIT License.

Links

4.2.1

8 years ago

4.2.0

8 years ago

4.1.1

8 years ago

4.1.0

8 years ago

4.0.1

8 years ago

4.0.0

8 years ago

3.0.0

8 years ago

2.0.0

9 years ago

1.7.3

9 years ago

1.7.2

9 years ago

1.7.1

9 years ago

1.7.0

9 years ago

1.6.1

9 years ago

1.6.0

9 years ago

1.5.0

9 years ago

1.4.0

9 years ago

1.3.0

9 years ago

1.2.1

9 years ago

1.2.0

9 years ago

1.0.0

9 years ago