@catalyst-elements/utils

Utility functions for the catalyst elements and other such components.

Usage no npm install needed!

<script type="module">
  import catalystElementsUtils from 'https://cdn.skypack.dev/@catalyst-elements/utils';
</script>

README

This is a work in progress that is not ready to be used yet

Catalyst Elements' Utilities

Travis David David npm (scoped)

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

  1. 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';
  1. 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.