uom-units
v2.5.1
Published
Predefined units for use with the uom package
Downloads
5,934
Maintainers
Keywords
Readme
uom-units
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