Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@digiserve/ab-utils

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@digiserve/ab-utils

A common set of utility functions shared by our AppBuilder services

  • 1.7.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
127
decreased by-60.92%
Maintainers
1
Weekly downloads
 
Created
Source

CodeQL Unit npm (scoped)

ab-utils

a set of common utilities shared by each of our microsservices

  • ab-utils
    • .serviceEventEmitter
    • .uuid()string
    • .config(key)object
    • .controller([key])ABServiceController
    • .telemetry()Telemetry
    • .reqApi(req, res, [config])ABRequestAPI
    • .reqService(req, controller)ABRequestService
    • .resApi(req, res)ABResponseAPI

ab-utils.service ⇐ EventEmitter

Our ABService class

Kind: static class of ab-utils
Extends: EventEmitter
See: ABService

new service(options)
ParamTypeDefault
optionsobj
[options.name]string"ABService"

Example

const AB = require("ab.utils");
const options = { name: "myService"};
const service = new AB.service(options);

ab-utils.uuid() ⇒ string

This is an alias for uuid.v4()

Kind: static method of ab-utils
Returns: string - uuid
See: uuid - npm

ab-utils.config(key) ⇒ object

Kind: static method of ab-utils
Returns: object - baseConfig

ParamTypeDescription
keystring[optional] a subportion of the configs specified

ab-utils.controller([key]) ⇒ ABServiceController

Get an AppBuilder Controller for use in our micro services

Kind: static method of ab-utils

ParamTypeDefault
[key]string"ABServiceController"

ab-utils.telemetry() ⇒ Telemetry

Get the telemetry interface

Kind: static method of ab-utils

ab-utils.reqApi(req, res, [config]) ⇒ ABRequestAPI

prepare a default set of data/utilities for our api request. This request is established in the Sails api_sails service and is used to verify and send jobs to various micro services.

Kind: static method of ab-utils

ParamTypeDefault
reqobj
resobj
[config]obj{}

ab-utils.reqService(req, controller) ⇒ ABRequestService

return a modified req object that supports our typical AB functions.

Kind: static method of ab-utils

ParamTypeDescription
reqobjthe standard request object received from the Cote service.
controllerABServiceController

ab-utils.resApi(req, res) ⇒ ABResponseAPI

prepare a default set of data/utilities for our api response.

Kind: static method of ab-utils

ParamType
reqobject
resobject

Classes

FAQs

Package last updated on 20 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc