apeman-service-entry

2.0.0 • Public • Published

apeman-service-entry

Build Status npm Version JS Standard

Service for form entries.

Installation

$ npm install apeman-service-entry --save

Usage

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

API

apeman-service-entry@2.0.0

Service for form entries.

Functions

create(args) -> ApEntryService

Create the service instance

Param Type Description
args *

ApEntryService Class

Service for entry

new ApEntryService(store, options)

Constructor of ApEntryService class

Param Type Description
store Object Redux store
options Object Optional settings

service.getEntry(entryName) -> Object

Get entry values

Param Type Description
entryName string Name of entry.

service.getEntryError(entryName) -> Object

Get entry errors

Param Type Description
entryName string Name of entry.

service.updateEntry(entryName, values) -> Promise

Update an entry.

Param Type Description
entryName string Name of entry.
values Object Values to set

service.clearEntry(entryName) -> Promise

Clear an entry.

Param Type Description
entryName string Name of entry.

service.clearEntryError(entryName) -> Promise

Clear errors for an entry.

Param Type Description
entryName string Name of entry.

service.catchEntryError(entryName, err) -> Promise

Catch entry error

Param Type Description
entryName string Name of entry
err Object Caught error

License

This software is released under the MIT License.

Links

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    3
    • latest

Version History

Package Sidebar

Install

npm i apeman-service-entry

Weekly Downloads

1

Version

2.0.0

License

MIT

Last publish

Collaborators

  • okunishinishi