Skip to content

Sturlen/convert

Repository files navigation

Usage

Syntax:

npx @sturlen/convert AMOUNT FROM TO

Example:

npx @sturlen/convert 1 kilometer miles
0.6

Supports SI-prefixes, singular, plural and abbreviations. e.g. kilometer, kilometers, km

Issues

If you want to request a feature or report a bug, feel free to open an issue on Github.

Supported units

All SI-units support the following prefixes:

  • yotta
  • zetta
  • exa
  • peta
  • tera
  • giga
  • mega
  • kilo
  • hecto
  • deca
  • deci
  • centi
  • milli
  • micro
  • nano
  • pico
  • femto
  • atto
  • yocto
  • zepto

Length

  • meter
  • inch
  • foot
  • yard
  • mile

Weight

  • gram
  • pound

Temperature

  • kelvin
  • celsius
  • fahrenheit
  • rankin

Todo

  • More quantities
  • Library version
  • Better precision
  • Help command
  • Handle mulitple unit matches, e.g. Celsius(C) and Candela(C)
  • Better way of testing all units, rather then manualy writing tests for each.
  • Dimensonality (m3, sqaure-foot, etc.)
  • Combined units (meters-per-second, mph)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published