1 | 'use strict';
|
2 | var classof = require('../internals/classof');
|
3 | var hasOwn = require('../internals/has-own-property');
|
4 | var isNullOrUndefined = require('../internals/is-null-or-undefined');
|
5 | var wellKnownSymbol = require('../internals/well-known-symbol');
|
6 | var Iterators = require('../internals/iterators');
|
7 |
|
8 | var ITERATOR = wellKnownSymbol('iterator');
|
9 | var $Object = Object;
|
10 |
|
11 | module.exports = function (it) {
|
12 | if (isNullOrUndefined(it)) return false;
|
13 | var O = $Object(it);
|
14 | return O[ITERATOR] !== undefined
|
15 | || '@@iterator' in O
|
16 | || hasOwn(Iterators, classof(O));
|
17 | };
|