Skip to content

Latest commit

 

History

History
56 lines (39 loc) · 1.77 KB

README.md

File metadata and controls

56 lines (39 loc) · 1.77 KB

uom-units

npm version travis build Coverage Status code style: prettier MIT license

Predefined units for use with the uom package

Introduction

This package has units that can be used with the uom package.

Installation

npm install --save uom-units

How to use

The main export from this package is the Units module that contains all the defined quantities and units.

Here is an example how to use the defined units for conversion:

import { Amount } from "uom";
import { Units } from "uom-units";

const amount = Amount.create(10, Units.Meter);
const inch = Amount.valueAs(Units.Inch, amount);

How to develop

Create a PR for addition or changes. Please update the changelog's "unreleased" section with your changes in your PR.

How to publish

Don't forget to update the changelog before publishing. Then run:

yarn version --patch
yarn version --minor
yarn version --major