massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / core-js / es / instance / includes.js
1 var isPrototypeOf = require('../../internals/object-is-prototype-of');
2 var arrayMethod = require('../array/virtual/includes');
3 var stringMethod = require('../string/virtual/includes');
4
5 var ArrayPrototype = Array.prototype;
6 var StringPrototype = String.prototype;
7
8 module.exports = function (it) {
9   var own = it.includes;
10   if (it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.includes)) return arrayMethod;
11   if (typeof it == 'string' || it === StringPrototype || (isPrototypeOf(StringPrototype, it) && own === StringPrototype.includes)) {
12     return stringMethod;
13   } return own;
14 };