Closed SreeChandan closed 4 years ago
startsWith
is a new feature of ES2015, so it doesn't have a good compatibility.
Ah, I didn't think of that.
That's ok. There is a polyfill in MDN
But this could bring more code. And I want this library smaller.
Hey, I hope I'm not offending. I was going through your code and felt like your usage of indexOf could be replaced with more explicit and appropriate methods like 'includes' and 'startsWith'. Let me know if you are actually using the index. It took me a while to understand you weren't using the index so thought to make it more explicit and use better alternatives.