haimkastner / unitsnet-js

A better way to hold unit variables and easily convert to the destination unit
https://www.npmjs.com/package/unitsnet-js
MIT License
25 stars 8 forks source link

Implement lazy load for each unit property #1

Closed haimkastner closed 4 years ago

haimkastner commented 4 years ago

Don't convert from the base again for each request for a specific unit, just after the first unit request keeps the result for the next request.

For example for Angle the base unit is Degrees, so in the first request for the angle as Radians convert from the base and keep the radians value for the radians' request.

haimkastner commented 4 years ago

By 768b942ceadec8a75c20ebb69069671acf5c04f7