js-quantities icon indicating copy to clipboard operation
js-quantities copied to clipboard

js-quantities is incompatible with sugarjs and prototypejs

Open kyrofa opened this issue 3 years ago • 0 comments

When simplifying numerators/denominators, js-quantities uses an array as both an array and an object, setting properties on it. This makes js-quantities incompatible with libraries that extend Array.prototype, like sugarjs and prototypejs, in very surprising ways. For example:

> q = Qty('100 gal/min');
> q.scalar
100
> q.units()
'gal/'

kyrofa avatar Jan 21 '22 18:01 kyrofa