npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@digiserve/ab-utils

v1.8.3

Published

A common set of utility functions shared by our AppBuilder services

Downloads

1,605

Readme

CodeQL Unit npm (scoped)

ab-utils

a set of common utilities shared by each of our microsservices

ab-utils.service ⇐ EventEmitter

Our ABService class

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

new service(options)

| Param | Type | Default | | --- | --- | --- | | options | obj | | | [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

| Param | Type | Description | | --- | --- | --- | | key | string | [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

| Param | Type | Default | | --- | --- | --- | | [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

| Param | Type | Default | | --- | --- | --- | | req | obj | | | res | obj | | | [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

| Param | Type | Description | | --- | --- | --- | | req | obj | the standard request object received from the Cote service. | | controller | ABServiceController | |

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

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

Kind: static method of ab-utils

| Param | Type | | --- | --- | | req | object | | res | object |

Classes