2.0.1 • Published 7 years ago

apeman-service-toggle v2.0.1

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

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

ParamTypeDescription
args*

ApToggleService Class

Service

new ApToggleService(store, options)

Constructor of ApToggleService class

ParamTypeDescription
storeObjectRedux store
optionsObjectOptional settings

service.getToggle(toggleName) -> boolean

Get goggle value

ParamTypeDescription
toggleNamestringName of toggle

service.turnToggle(toggleName, flg) -> Promise

Turn toggle value

ParamTypeDescription
toggleNamestringName of toggle
flgboolean

service.turnOffToggle(toggleName) -> Promise

Turn toggle to off

ParamTypeDescription
toggleNamestringName of toggle

service.turnOnToggle(toggleName) -> Promise

Turn toggle to on

ParamTypeDescription
toggleNamestringName of toggle

License

This software is released under the MIT License.

Links

2.0.1

7 years ago

2.0.0

7 years ago

1.1.4

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago