npm

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

Readme

Keywords

Package Sidebar

Install

npm i apeman-service-toggle

Weekly Downloads

0

Version

2.0.1

License

MIT

Last publish

Collaborators

  • okunishinishi