0.0.2 • Published 5 years ago

@catalyst-elements/utils v0.0.2

Weekly downloads
1
License
BSD-3-Clause
Repository
github
Last release
5 years ago

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

FunctionDescription
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.