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

format: stop relying on array properties

Open kyrofa opened this issue 3 years ago • 0 comments

There are numerous libraries out there (sugarjs, prototypejs) that extend the Array prototype. The simplify function in js-quantities relies on setting/checking properties on an array instance, which means that it's incompatible with such libraries. This PR fixes #130, adding compatibility by using a separate object for keeping track of the counters instead of using properties on array instances.

Note: It was unclear whether I should be including changes to generated files. Please let me know if I should only be changing the src/spec files and I can update this PR.

kyrofa avatar Jan 21 '22 18:01 kyrofa