2.0.0 • Published 7 years ago

apeman-service-entry v2.0.0

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

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

ParamTypeDescription
args*

ApEntryService Class

Service for entry

new ApEntryService(store, options)

Constructor of ApEntryService class

ParamTypeDescription
storeObjectRedux store
optionsObjectOptional settings

service.getEntry(entryName) -> Object

Get entry values

ParamTypeDescription
entryNamestringName of entry.

service.getEntryError(entryName) -> Object

Get entry errors

ParamTypeDescription
entryNamestringName of entry.

service.updateEntry(entryName, values) -> Promise

Update an entry.

ParamTypeDescription
entryNamestringName of entry.
valuesObjectValues to set

service.clearEntry(entryName) -> Promise

Clear an entry.

ParamTypeDescription
entryNamestringName of entry.

service.clearEntryError(entryName) -> Promise

Clear errors for an entry.

ParamTypeDescription
entryNamestringName of entry.

service.catchEntryError(entryName, err) -> Promise

Catch entry error

ParamTypeDescription
entryNamestringName of entry
errObjectCaught error

License

This software is released under the MIT License.

Links

2.0.0

7 years ago

1.2.4

7 years ago

1.2.3

7 years ago

1.2.2

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago