Provides framework-agnostic functionality for use in applications.
To install the necessary dependencies:
npm install
To generate documentation files:
npm run docs
To create distributable bundles:
npm run build
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:
import * as core from '@paychex/core';
import { events } from '@paychex/core';
const core = require('@paychex/core');
const { events } = require('@paychex/core');
define(['@paychex/core'], function(core) {});
define(['@paychex/core'], function({ events }) {});
require(['@paychex/core'], function(core) {});
require(['@paychex/core'], function({ events }) {});
const core = window['@paychex/core'];
const { events } = window['@paychex/core'];
// esm
import { spy } from '@paychex/core/test';
// commonjs
const { spy } = require('@paychex/core/test');
Before creating a new feature for the @paychex/core
library, please read CONTRIBUTING.md.