mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 17:35:16 +00:00
16 lines
722 B
JavaScript
16 lines
722 B
JavaScript
|
'use strict';
|
||
|
var $ = require('../internals/export');
|
||
|
var notARegExp = require('../internals/not-a-regexp');
|
||
|
var requireObjectCoercible = require('../internals/require-object-coercible');
|
||
|
var toString = require('../internals/to-string');
|
||
|
var correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');
|
||
|
|
||
|
// `String.prototype.includes` method
|
||
|
// https://tc39.es/ecma262/#sec-string.prototype.includes
|
||
|
$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
|
||
|
includes: function includes(searchString /* , position = 0 */) {
|
||
|
return !!~toString(requireObjectCoercible(this))
|
||
|
.indexOf(toString(notARegExp(searchString)), arguments.length > 1 ? arguments[1] : undefined);
|
||
|
}
|
||
|
});
|