apeman-service-toast

2.0.0 • Public • Published

apeman-service-toast

Build Status Code Climate Code Coverage npm Version JS Standard

Service for toasts.

Installation

$ npm install apeman-service-toast --save

Usage

#!/usr/bin/env node
 
'use strict'
 
const { ApToastService } = require('apeman-service-toast')
const { createStore } = require('redux')
const { reducer } = require('apeman-service-base')
const co = require('co')
 
co(function * () {
  let store = createStore(reducer)
  let service = new ApToastService(store)
 
 
}).catch((err) => console.error(err))

API

apeman-service-toast@2.0.0

Service for toasts.

Functions

create(args) -> ApToastService

Create the service instance

Param Type Description
args *

ApToastService Class

Service

new ApToastService(store, options)

Constructor of ApToastService class

Param Type Description
store Object Redux store
options Object Optional settings

service.getToasts(level) -> Array.<string>

Get toast

Param Type Description
level string Toast level

service.toast(level, text) -> Promise

Show toast

Param Type Description
level string Toast level
text string Toast text

service.infoToast(text) -> Promise

Show info toast

Param Type Description
text

service.warnToast(text) -> Promise

Show warn toast

Param Type Description
text

service.errorToast(text) -> Promise

Show error toast

Param Type Description
text

License

This software is released under the MIT License.

Links

Readme

Keywords

Package Sidebar

Install

npm i apeman-service-toast

Weekly Downloads

3

Version

2.0.0

License

MIT

Last publish

Collaborators

  • okunishinishi