All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Moved typescript from dependencies to devDependencies.
- Added functions: mod, floor, ceil, round, abs, max, min, sum
- Fixed invalid imports in documentation examples.
- Some lesser tweaks in docs
- Removed need for Scalar unit, now you can just use plain numbers
- Removed "curried" versions of functions and added overloads for partial application for "ordinary" functions
- Increased exponents range to <-6, 6> from <-4, 4>
- Updated documentation, more examples.
- Now supported TS 4.0
- Library didn't work for TS versions over 3.0.4, now it supports TS versions up to at least 4.0.
- Compile ts files to es5 js files and declarations on build and distribute them to npm instead of source ts files.
- Added uncurried functions to library as they are more common to use.
- Renamed previous curried functions, in example:
add
renamedaddCurried
etc. Old names are taken by uncurried version of these functions. AppendixCurried
might not be pleasent to see, but you can just aliast them on import like that:import { mulCurried as mul } from "uom-ts";
- Updated documentation "force" example, now it uses remeda pipe instead of ramda which is much easier to understand.
- Renamed internal name for key that was used for checking exact types.
- When units after some operation had exponent of 0 then they had value undefined. Such units were included to check for exact type and because of that it didn't always bring unit type safety.
- On operations, key that is used for checking exact types, was also included in units list, this caused bug with operating on scalar type and lost type safety afterwards.