bgrins / TinyColor

Fast, small color manipulation and conversion for JavaScript
https://bgrins.github.io/TinyColor/
MIT License
5.05k stars 438 forks source link

Drop ID counter #224

Closed szakharchenko closed 3 years ago

szakharchenko commented 3 years ago

Drop unnecessary tinycolor object ID counting which was introduced in https://github.com/bgrins/TinyColor/commit/904669c4cc1b280222c6218f9e1a5b4cc9614d67 and used for checking if an object is a tinycolor instance. The check was then rewritten in https://github.com/bgrins/TinyColor/commit/5b4ec7e3d1d3150510399830db9d10055f065f87 to not require the ID. In addition to needlessly occupying space, the running ID prevents naive deep equality tests from working.

bgrins commented 3 years ago

Thanks, this makes sense to me