npm.io
0.21.0 • Published 2 weeks ago

@carbon/utilities

Licence
Apache-2.0
Version
0.21.0
Deps
0
Vulns
0
Weekly
0
Stars
9.3K

@carbon/utilities

Utilities and helpers to drive consistency across software products using the Carbon Design System

Getting started

To install @carbon/utilities in your project, you will need to run the following command using npm:

npm install @carbon/utilities

If you prefer Yarn, use the following command instead:

yarn add @carbon/utilities

Maintainer information

This package uses a convention-based multi-entry build. The supported public API consists of two parts.

  1. The root entrypoint
import { utility } from '@carbon/utilities';
  1. Any top-level module with a src/<name>/index.ts file
import { utility } from '@carbon/utilities/utility';

Review the architecture decision record (ADR) for more detail on how and why this approach is used.

Adding a utility
  1. Create a new top-level directory under src/
  2. Export the public API for that utility from src/<name>/index.ts
  3. Re-export it from src/index.ts if it should also be available from the package root
  4. Build the package and verify the generated outputs under es/<name>/index.* and lib/<name>/index.js
src/
  someUtility/
    index.ts
    someUtility.ts

Contributing

We're always looking for contributors to help us fix bugs, build new features, or help us improve the project documentation. If you're interested, definitely check out our Contributing Guide!

License

Licensed under the Apache 2.0 License.

IBM Telemetry IBM Telemetry

This package uses IBM Telemetry to collect de-identified and anonymized metrics data. By installing this package as a dependency you are agreeing to telemetry collection. To opt out, see Opting out of IBM Telemetry data collection. For more information on the data being collected, please see the IBM Telemetry documentation.

Keywords