uom-units
TypeScript icon, indicating that this package has built-in type declarations

2.5.1 • Public • Published

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

/uom-units/

    Package Sidebar

    Install

    npm i uom-units

    Weekly Downloads

    710

    Version

    2.5.1

    License

    MIT

    Unpacked Size

    1.03 MB

    Total Files

    1200

    Last publish

    Collaborators

    • rassva
    • zlafil
    • johkah
    • dividstefansvensson
    • erieng
    • johankristiansson
    • adam.luotonen
    • jonaskello
    • jontem
    • bjolind
    • geon
    • marsve
    • henbr
    • josef.dagson
    • oskdah