added includes polyfill

This commit is contained in:
silas 2018-10-27 13:05:13 +02:00
parent bb894c4bfd
commit f89354ea03
2 changed files with 6 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -4383,6 +4383,10 @@ function applyPolyfills() {
return this.indexOf(searchString, position) === position;
});
String.prototype.includes = Helper.nonNull(String.prototype.includes, function (searchString) {
return this.indexOf(searchString) >= 0;
});
String.prototype.endsWith = Helper.nonNull(String.prototype.endsWith, function (searchString, position) {
var subjectString = this.toString();
if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > subjectString.length) {