In our lib code, we are still using Array#indexOf to determine if an item is existed in array.
For example:
|
this.hostname.indexOf(':') === -1 ? |
|
if (str.indexOf("'") !== -1) { |
For semantics, I think it's more appropriate to move them into Array#includes and it seems no performance difference between them at present: https://jsperf.com/array-indexof-vs-includes.