Negatory. Postpone Mission.
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

apeman-service-toggle

2.0.1 • Public • Published

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

install

npm i apeman-service-toggle

Downloadsweekly downloads

9

version

2.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar