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
23 stars 8 forks source link

Add unit type to the DTO #46

Open haimkastner opened 2 months ago

haimkastner commented 2 months ago

To make the schema and documentation clear, and to support full units DTO, including the type itself (Length, Angle, etc). Like this:

{
   "value":100.01,
   "quantity":"Meter",
   "unit": "Length"
}

Implement it while still keeping BC to the current DTO implementation.

See discussion on angularsen/UnitsNet#1378