source: trip-planner-front/node_modules/core-js/es/instance/includes.js@ 6a3a178

Last change on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 533 bytes
Line 
1var arrayIncludes = require('../array/virtual/includes');
2var stringIncludes = require('../string/virtual/includes');
3
4var ArrayPrototype = Array.prototype;
5var StringPrototype = String.prototype;
6
7module.exports = function (it) {
8 var own = it.includes;
9 if (it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.includes)) return arrayIncludes;
10 if (typeof it === 'string' || it === StringPrototype || (it instanceof String && own === StringPrototype.includes)) {
11 return stringIncludes;
12 } return own;
13};
Note: See TracBrowser for help on using the repository browser.