Convert Units Versions Save

An elegant way to convert quantities between different units.

v3.0.0-beta.6

3 months ago

General

  • Add .js to all import statements to better support esm modules
  • Fixed some styling issues
  • Refactor package so that measures can be imported/required independantly
  • Move definitions index.ts file to all.ts
  • Remove measure export from all.ts
  • Fix import statements in tests
  • Update tsconfig configs so that types are included in their own folder inside
  • Update package.json to better support esm and typescript package requirements
  • Replace ts-ignore with ts-expect-error in tests

Measures

  • Add mil/mils as imperial length unit (1/1000th of an inch)
  • Fixed Kelvin singular and plural values
  • Add Ws (Watt-second) and Wm (Watt-minute)
  • Add mH2O and mmHg pressure conversions
  • Add torque
  • Add kilogram-force to force
  • Add stones
  • Add calorie and kcalorie as new nutritional energy units

Development

  • Update development dependencies
  • Update node versions for ci runner

v3.0.0-beta.5

1 year ago

General

  • Add TS github action which will now run on PRs
  • Updated dev packages to latest verions (#674af3d)
  • Add contributing document

Measures

  • Add in/hr and mm/hr to Speed
  • Add lb/h, lb/h, kg/h, kg/s, and mt/h to Mass Flow Rate
  • Fix Digital measures to use base 10 instead of base 2

v3.0.0-beta.4

2 years ago

General

  • Fixed toBest so that it correctly handles negative numbers
  • Fixed a couple spelling mistakes

Measures

  • Add MJ and GJ to Energy
  • Add Ml and Gl to Volume

v3.0.0-beta.3

2 years ago

General

  • Add system option to toBest method
  • Fix incorrect singular and plural names for krm unit
  • Fix toBest returning a number less than the cut off number #219
  • Update documentation to hopefully provide better examples
  • Various development dependency updates

Measures

  • Add inches of mercury
  • Add ft/min
  • Add nm2
  • Add μm2

v3.0.0-beta.2

2 years ago

General

  • fix TS4023 error when using module commonjs
  • fix eslint warnings on functions without a declared return type

v3.0.0-beta.1

2 years ago

General

  • Move core code out of the index file and into its own file. This is so that the index file can be used strictly for exporting
  • Add exports for all measures from the index file in definitions
  • Remove unit property from Anchor
  • Update measure structure and Convert class to support any system name
  • Update measure structure and Convert class to support any number of systems
  • Update Convert class to support generics types for Measure names, System names, and Unit names. This provides TS with enough information to warm users if they are trying to use a unit that doesn't exist (for example)
  • Update Convert class to throw an error if system anchors are missing

Measures

  • Fix descriptions for cm2 area unit

3.0.0-beta.0

2 years ago

General

  • Remove lodash dependencies
  • Add better typescript support
  • Add support for custom measures
  • Update release to support different modules: cjs, esm and, umd

Measures

  • Add pieces measure
  • Add new power units (Btu/s, ft-lb/s and hp)
  • Update miles per hour to use correct abbreviation mph
  • Add Add nonometers and micrometers

v2.3.3

6 years ago
  • Added support for new units
    • Illuminance [ lux, ft-cd ]
    • Frequencies [ mHz, kHz, MHz, GHz, THz, rpm, deg/s, rad/s ]
  • Added toBest({ cutOffNumber }) option.
  • Updated documentation and tests.

v2.3.2

6 years ago

Updated README

  • Added installation instructions
  • Added new unit types

Added support for new units:

  • Imperial Tons (t)
  • Metric Tonnes (mt).