i still always need to think about what this "trick" does in JS: if (~arr.indexOf(el)) { /* whatev */ } please just write `!== -1` :(
-
-
yes, unless you target node <4 or IE11 for some godforsaken reason, includes() is what you use :P most of the frontend stuff i work on still targets IE11, and browserify still works on Node 0.8(!!), so i'm out of luck!
-
Polyfill if it's used enough, It would only be a few bytes to a bundle to ensure you have it :)
End of conversation
New conversation -
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.