wallet-core/node_modules/core-js/modules/es6.string.includes.js

13 lines
479 B
JavaScript
Raw Normal View History

2016-10-10 03:43:44 +02:00
// 21.1.3.7 String.prototype.includes(searchString, position = 0)
'use strict';
2017-08-14 05:01:11 +02:00
var $export = require('./_export');
var context = require('./_string-context');
var INCLUDES = 'includes';
2016-10-10 03:43:44 +02:00
2017-05-27 17:36:13 +02:00
$export($export.P + $export.F * require('./_fails-is-regexp')(INCLUDES), 'String', {
2017-08-14 05:01:11 +02:00
includes: function includes(searchString /* , position = 0 */) {
2016-10-10 03:43:44 +02:00
return !!~context(this, searchString, INCLUDES)
.indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
}
2017-08-14 05:01:11 +02:00
});