apeman-service-toast
Service for toasts.
Last updated 2 years ago by okunishinishi .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install apeman-service-toast 
SYNC missed versions from official npm registry.

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

Current Tags

  • 2.0.0                                ...           latest (2 years ago)

3 Versions

  • 2.0.0                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 3
This Month 10
Last Day 0
Last Week 7
Last Month 4
Dependencies (5)
Dev Dependencies (14)
Dependents (2)

Copyright 2014 - 2016 © taobao.org |