Closed tplaindoux closed 9 years ago
Thanks for your input, and checking out the source :smile:
Personally, I don't mind the polyfill method. I'd prefer to code in a modern native syntax, instead of creating helper functions that need to be remembered and learned.
Mozilla Developer Network suggests a polyfill as a fallback solution too, although it contains more complexity than what was required for this package, which is why I chose a simpler polyfill.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf
From your comment, this link http://stackoverflow.com/questions/1181575/javascript-determine-whether-an-array-contains-a-value/1181586#1181586
now provide a better solution: