apemanstore
Flux store for apeman
Last updated 3 years ago by okunishinishi .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install apemanstore 
SYNC missed versions from official npm registry.

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

Current Tags

  • 4.2.1                                ...           latest (3 years ago)

20 Versions

  • 4.2.1                                ...           3 years ago
  • 4.2.0                                ...           3 years ago
  • 4.1.1                                ...           3 years ago
  • 4.1.0                                ...           3 years ago
  • 4.0.1                                ...           3 years ago
  • 4.0.0                                ...           3 years ago
  • 3.0.0                                ...           3 years ago
  • 2.0.0                                ...           4 years ago
  • 1.7.3                                ...           4 years ago
  • 1.7.2                                ...           4 years ago
  • 1.7.1                                ...           4 years ago
  • 1.7.0                                ...           4 years ago
  • 1.6.1                                ...           4 years ago
  • 1.6.0                                ...           4 years ago
  • 1.5.0                                ...           4 years ago
  • 1.4.0                                ...           4 years ago
  • 1.3.0                                ...           4 years ago
  • 1.2.1                                ...           4 years ago
  • 1.2.0                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (6)
Dev Dependencies (12)

Copyright 2014 - 2016 © taobao.org |