main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 2 weeks ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
624 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 | var classof = require('../../internals/classof');
|
---|
3 | var hasOwn = require('../../internals/has-own-property');
|
---|
4 | var isPrototypeOf = require('../../internals/object-is-prototype-of');
|
---|
5 | var method = require('../array/virtual/for-each');
|
---|
6 | require('../../modules/web.dom-collections.for-each');
|
---|
7 |
|
---|
8 | var ArrayPrototype = Array.prototype;
|
---|
9 |
|
---|
10 | var DOMIterables = {
|
---|
11 | DOMTokenList: true,
|
---|
12 | NodeList: true
|
---|
13 | };
|
---|
14 |
|
---|
15 | module.exports = function (it) {
|
---|
16 | var own = it.forEach;
|
---|
17 | return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.forEach)
|
---|
18 | || hasOwn(DOMIterables, classof(it)) ? method : own;
|
---|
19 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.