I tested many of case and it seems property check is cheaper than typeof check.
So I confirmed all of method of Array.
And it seems `pop` is shortest method name.
Now I check `pop` instead of isArray.
If you have any other idea, please notice me!
Thank you again :)
Yes you're right.
It seems Array.isArray compare with Array.prototype and that work is expensive!
Let me try several case and I'll try to find what is the best code.
Thank you :)
[comment deleted]troy-tae 1857 days ago. link 1 point ▲▼
I think this module's role is different with classList.
As you said, classList is a API of DOM.
But this module just generates a string.
So... I think this module is useful for framework or library user(React, Angular, Vue)
In VanillaJS, absolutely classList is good :)
And no worries, I'm not care about the downvote.
All of positive or negative opinions always welcome!