dividab / uom

Extensible unit of measure conversion with type safety for typescript
MIT License
18 stars 1 forks source link

Add unit lookup #51

Closed Jontem closed 3 years ago

Jontem commented 3 years ago

In v4.0.0 we addressed a performance issue with looking up units. But the feature for case insensitive units was removed. This PR creates a unitLookup function instead which takes unitString as a parameter and returns the matching unit. In this way we can still have case insesitve units and perfomance. It will be up to the consumer to implement the lookup