You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
typesetting/pitfall/pdfkit/node_modules/core-js/modules/es6.string.includes.js

12 lines
476 B
JavaScript

// 21.1.3.7 String.prototype.includes(searchString, position = 0)
'use strict';
var $export = require('./_export')
, context = require('./_string-context')
, INCLUDES = 'includes';
$export($export.P + $export.F * require('./_fails-is-regexp')(INCLUDES), 'String', {
includes: function includes(searchString /*, position = 0 */){
return !!~context(this, searchString, INCLUDES)
.indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
}
});