convert

The smallest & fastest library for really easy, totally type-safe unit conversions in TypeScript & JavaScript.

MIT License

Downloads
124.8K
Stars
105
Committers
9

Bot releases are visible (Hide)

convert - v3.1.0

Published by github-actions[bot] about 3 years ago

3.1.0 (2021-09-07)

Features

  • length: add ' and " symbols for feet and inches (58ff797)
  • types: improve return type when converting to "best" (b2eea2e)
convert - v3.0.0

Published by github-actions[bot] about 3 years ago

3.0.0 (2021-09-07)

Features

  • remove duplicate uncommon units and duplicate units (fda3e61)

BREAKING CHANGES

  • Several units that are uncommon or no longer relevant in modern times have been removed. If you are using official unit symbols and full names this will not affect you.
convert - v2.2.1

Published by github-actions[bot] about 3 years ago

2.2.1 (2021-08-29)

Bug Fixes

  • types: export Area type (011f39b)
convert - v2.2.0

Published by github-actions[bot] about 3 years ago

2.2.0 (2021-08-25)

Bug Fixes

Features

  • area: add support for area conversion (148569e), closes #254
convert - v2.1.1

Published by github-actions[bot] over 3 years ago

2.1.1 (2021-06-27)

Bug Fixes

  • typings: fix TS1254 compilation errors (98a16b2)
convert - v2.1.0

Published by github-actions[bot] over 3 years ago

2.1.0 (2021-06-27)

Features

  • rewrite for bundle size and add "convert to best" (#209) (16fffb1)
convert - v2.0.0

Published by github-actions[bot] over 3 years ago

2.0.0 (2021-06-18)

Features

  • change return type of convert function (cfa2a04)
  • rename type exports (160fb4b)

BREAKING CHANGES

  • The type Unit was renamed to Conversion
    The enum UnitFamilies was renamed to UnitFamily
  • The convert function has been changed from convert(quantity).from(unit).to(unit) to convert(quantity, unit).to(unit. If you are using TypeScript the updated return types are also slightly different but should not introduce compiler errors.
convert - v1.9.1

Published by github-actions[bot] over 3 years ago

1.9.1 (2021-05-25)

Performance Improvements

  • inline invariant function (883c483)
convert - v1.9.0

Published by github-actions[bot] over 3 years ago

1.9.0 (2021-05-12)

Features

  • add better error message for accidental time -> distance conversion during development (0149137)
convert - v1.8.3

Published by github-actions[bot] over 3 years ago

1.8.3 (2021-04-13)

Performance Improvements

  • remove exports field because it exposes unoptimized builds (468865e)
convert - v1.8.2

Published by github-actions[bot] over 3 years ago

1.8.2 (2021-03-20)

Bug Fixes

  • fix module exports for Node.js (0f8a2ee)
convert - v1.8.1

Published by github-actions[bot] over 3 years ago

1.8.1 (2021-03-15)

Performance Improvements

  • temperature: write -x/y as x/-y to prevent expansion (6fb41ff)
convert - v1.8.0

Published by github-actions[bot] over 3 years ago

1.8.0 (2021-03-05)

Features

convert - v1.7.1

Published by github-actions[bot] over 3 years ago

1.7.1 (2021-03-05)

Bug Fixes

  • convertMany: allow converting units containing numbers (6581876)
  • convertMany: support negative numbers and leading . (14d923f)
convert - v1.7.0

Published by github-actions[bot] over 3 years ago

1.7.0 (2021-03-04)

Features

  • convertMany: check if to unit is valid in dev mode (426d4c6)
convert - v1.6.3

Published by github-actions[bot] over 3 years ago

1.6.3 (2021-03-03)

Bug Fixes

  • convert units, even when the units are the same (bde0363)
convert - v1.6.2

Published by github-actions[bot] almost 4 years ago

1.6.2 (2021-01-03)

Bug Fixes

  • data: fix conversion ratio for petabytes (41b71ca)
convert - v1.6.1

Published by github-actions[bot] almost 4 years ago

1.6.1 (2020-12-31)

Bug Fixes

  • add comma to package.json (929fd30)
convert - v1.6.0

Published by github-actions[bot] almost 4 years ago

1.6.0 (2020-12-31)

Bug Fixes

  • tsc: add converter overloads for angle and force (f6d2c51)
  • tsc: fix types for null prototype conversions object (b1de0a4)

Features

  • angle: add support for angle conversion (a5bba09)
  • force: add support for force conversion (5037e41)
convert - v1.5.0

Published by github-actions[bot] almost 4 years ago

1.5.0 (2020-12-31)

Bug Fixes

  • convertMany: fix split regular expression last index interfering with other calls (055bab3)

Features

  • convert: check if from & to units exist before conversion in development mode (a38a5af)

Performance Improvements

  • combine conversions into single object instead of merging at runtime (d434c35)