Options
All
  • Public
  • Public/Protected
  • All
Menu

@paychex/core

@paychex/core

Provides framework-agnostic functionality for use in applications.

Commands

To install the necessary dependencies:

npm install

To generate documentation files:

npm run docs

To create distributable bundles:

npm run build

Modules

The @paychex/core library contains functionality separated into various modules:

name description
data Provides methods for creating and configuring a data layer, providing applications the ability to invoke data operations for various endpoints.
errors Provides utility methods for working with Errors.
events Provides an event bus for publish/subscribe behavior.
formatters Provides functionality to control text output.
functions Provides wrappers for functions to extend behavior.
models Provides utilities for working with collections of structured data.
process Provides utilities for running complex, asynchronous processes.
signals Provides utilities for synchronizing blocks of code.
stores Provides client-side storage. How long data is persisted for depends on the store type and configuration options.
trackers Provides event, error, and performance logging for applications.
validators Provides validation factories to enforce data quality.
test Provides functionality useful during unit testing.

All code is exported through a top-level namespace you can access in the following ways:

esm

import * as core from '@paychex/core';
import { events } from '@paychex/core';

commonjs

const core = require('@paychex/core');
const { events } = require('@paychex/core');

amd

define(['@paychex/core'], function(core) {});
define(['@paychex/core'], function({ events }) {});
require(['@paychex/core'], function(core) {});
require(['@paychex/core'], function({ events }) {});

iife (web browser)

const core = window['@paychex/core'];
const { events } = window['@paychex/core'];

unit tests

// esm
import { spy } from '@paychex/core/test';

// commonjs
const { spy } = require('@paychex/core/test');

Contributing

Before creating a new feature for the @paychex/core library, please read CONTRIBUTING.md.