|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
637 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 | var isPrototypeOf = require('../../internals/object-is-prototype-of');
|
|---|
| 3 | var arrayMethod = require('../array/virtual/includes');
|
|---|
| 4 | var stringMethod = require('../string/virtual/includes');
|
|---|
| 5 |
|
|---|
| 6 | var ArrayPrototype = Array.prototype;
|
|---|
| 7 | var StringPrototype = String.prototype;
|
|---|
| 8 |
|
|---|
| 9 | module.exports = function (it) {
|
|---|
| 10 | var own = it.includes;
|
|---|
| 11 | if (it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.includes)) return arrayMethod;
|
|---|
| 12 | if (typeof it == 'string' || it === StringPrototype || (isPrototypeOf(StringPrototype, it) && own === StringPrototype.includes)) {
|
|---|
| 13 | return stringMethod;
|
|---|
| 14 | } return own;
|
|---|
| 15 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.