/unit-converter

Convert whatever ur heart desires

Primary LanguageTypeScript

unit-converter

Convert whatever ur heart desires

  • This is a generic conversion utility that will convert units when possible based on the conversion factors specified by a directed graph.

  • A direct path is not required, this utility will attempt to traverse the graph to find a valid conversion path, also, there's no need to worry about cycles in your graph.

Caveats:

  • Because JS sucks at using decimals, it's recommended to chain your conversions with toFixed() to deal with annoying floating-point errors.