A common set of utility functions shared by our AppBuilder services
npm install @digiserve/ab-utils  
* ab-utils
* .service ⇐ EventEmitter
* new service(options)
* .uuid() ⇒ string
* .config(key) ⇒ object
* [.controller([key])](#module_ab-utils.controller) ⇒ ABServiceController
* .telemetry() ⇒ Telemetry
* [.reqApi(req, res, [config])](#module_ab-utils.reqApi) ⇒ ABRequestAPI
* .reqService(req, controller) ⇒ ABRequestService
* .resApi(req, res) ⇒ ABResponseAPI
Kind: static class of ab-utils
Extends: EventEmitter
See: ABService
#### new service(options)
| Param | Type | Default |
| --- | --- | --- |
| options | obj | |
| [options.name] | string | "ABService" |
Example
``js``
const AB = require("ab.utils");
const options = { name: "myService"};
const service = new AB.service(options);
Kind: static method of ab-utils
Returns: string - uuid
See: uuid - npm
ab-utils object - baseConfig | Param | Type | Description |
| --- | --- | --- |
| key | string | [optional] a subportion of the configs specified |
Kind: static method of ab-utils
| Param | Type | Default |
| --- | --- | --- |
| [key] | string | "ABServiceController" |
Kind: static method of ab-utils
Kind: static method of ab-utils
| Param | Type | Default |
| --- | --- | --- |
| req | obj | |
| res | obj | |
| [config] | obj | {} |
Kind: static method of ab-utils
| Param | Type | Description |
| --- | --- | --- |
| req | obj | the standard request object received from the Cote service. |
| controller | ABServiceController | |
Kind: static method of ab-utils
| Param | Type |
| --- | --- |
| req | object |
| res | object |