UNPKG

polyfill-service

Version:
5 lines (4 loc) 264 B
String.prototype.includes = function (string, index) { if (typeof string === 'object' && string instanceof RegExp) throw new TypeError("First argument to String.prototype.includes must not be a regular expression"); return this.indexOf(string, index) !== -1; };