apeman-service-toggle
Service for toggle.
Last updated 8 months ago by okunishinishi .
MIT · Repository · Bugs · Original npm · Tarball
$ cnpm install apeman-service-toggle 
SYNC missed versions from official npm registry.

apeman-service-toggle

Build Status npm Version JS Standard

Service for toggle.

Installation

$ npm install apeman-service-toggle --save

Usage

#!/usr/bin/env node

'use strict'

const { ApToggleService } = require('apeman-service-toggle')
const { createStore } = require('redux')

{
  let store = createStore({ /* ... */ })
  let service = new ApToggleService(store)
}

API

apeman-service-toggle@2.0.0

Service for toggle.

Functions

create(args) -> ApToggleService

Create the service instance

Param Type Description
args *

ApToggleService Class

Service

new ApToggleService(store, options)

Constructor of ApToggleService class

Param Type Description
store Object Redux store
options Object Optional settings

service.getToggle(toggleName) -> boolean

Get goggle value

Param Type Description
toggleName string Name of toggle

service.turnToggle(toggleName, flg) -> Promise

Turn toggle value

Param Type Description
toggleName string Name of toggle
flg boolean

service.turnOffToggle(toggleName) -> Promise

Turn toggle to off

Param Type Description
toggleName string Name of toggle

service.turnOnToggle(toggleName) -> Promise

Turn toggle to on

Param Type Description
toggleName string Name of toggle

License

This software is released under the MIT License.

Links

Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (4)
Dev Dependencies (14)
Dependents (2)

Copyright 2014 - 2017 © taobao.org |