This is a work in progress that is not ready to be used yet
Catalyst Elements' Utilities
This package contains utility functions that maybe helpful for use in custom web components.
Installation
# Install with npm:
npm install @catalyst-elements/utils
# Install with yarn:
yarn add @catalyst-elements/utils
Usage
- Import the utilities.
// Import all the util functions.
import * as utils from '@catalyst-elements/utils';
// Or import a subset of util functions.
import * as arrayUtils from '@catalyst-elements/utils/lib/array';
- Use them.
const foo = utils.array.transpose([[0, 1, 2], [3, 4, 5]]);
// Or
const foo = arrayUtils.transpose([[0, 1, 2], [3, 4, 5]]);
Utility Functions
The following utility functions are available:
Array functions
Function | Description |
---|---|
transpose(array) |
Returns a new 2D array that is a transposed version of the original. |
Contributions
Contributions are most welcome.
Please read our contribution guidelines.