massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / core-js / modules / es.string.includes.js
1 'use strict';
2 var $ = require('../internals/export');
3 var uncurryThis = require('../internals/function-uncurry-this');
4 var notARegExp = require('../internals/not-a-regexp');
5 var requireObjectCoercible = require('../internals/require-object-coercible');
6 var toString = require('../internals/to-string');
7 var correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');
8
9 var stringIndexOf = uncurryThis(''.indexOf);
10
11 // `String.prototype.includes` method
12 // https://tc39.es/ecma262/#sec-string.prototype.includes
13 $({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
14   includes: function includes(searchString /* , position = 0 */) {
15     return !!~stringIndexOf(
16       toString(requireObjectCoercible(this)),
17       toString(notARegExp(searchString)),
18       arguments.length > 1 ? arguments[1] : undefined
19     );
20   }
21 });