/
asias
/
new
Обзор
Документация
Войти
/
asias
/
new
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
node_modules/core-js/es/instance/includes.js
15 строк
637 B
AnastasyaDemina
project
07 дек 2025, 23:03
07 дек 2025, 23:03
7c21e25
Код
Авторство
О чём код?
'use strict'; var isPrototypeOf = require('../../internals/object-is-prototype-of'); var arrayMethod = require('../array/virtual/includes'); var stringMethod = require('../string/virtual/includes'); var ArrayPrototype = Array.prototype; var StringPrototype = String.prototype; module.exports = function (it) { var own = it.includes; if (it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.includes)) return arrayMethod; if (typeof it == 'string' || it === StringPrototype || (isPrototypeOf(StringPrototype, it) && own === StringPrototype.includes)) { return stringMethod; } return own; };