Javascript String includes(str)
'use strict'//from w w w. jav a 2s. c o m String.prototype.includes = function (str) { return !!~this.indexOf(str) }