apeman-service-preference
Service for preferences.
Installation
$ npm install apeman-service-preference --save
Usage
#!/usr/bin/env node 'use strict' const ApPreferenceService = const createStore = const reducer = const co =
API
apeman-service-preference@2.0.0
Service for preferences.
- Functions
- ApPreferenceService Class
Functions
ApPreferenceService
create(args) -> Create the service instance
Param | Type | Description |
---|---|---|
args | * |
ApPreferenceService Class
Service
new ApPreferenceService(store, options)
Constructor of ApPreferenceService class
Param | Type | Description |
---|---|---|
store | Object | Redux store |
options | Object | Optional settings |
*
service.getPreference(fieldName) -> Get preference value
Param | Type | Description |
---|---|---|
fieldName |
Promise
service.setPreference(fieldName, value) -> Set preference
Param | Type | Description |
---|---|---|
fieldName | string | Name of preference field |
value | * | Value to set |
Promise
service.deletePreference(fieldName) -> Delete preference
Param | Type | Description |
---|---|---|
fieldName | string | Name of preference field |
License
This software is released under the MIT License.