UNPKG

570 BJavaScriptView Raw
1'use strict';
2var classof = require('../internals/classof');
3var hasOwn = require('../internals/has-own-property');
4var isNullOrUndefined = require('../internals/is-null-or-undefined');
5var wellKnownSymbol = require('../internals/well-known-symbol');
6var Iterators = require('../internals/iterators');
7
8var ITERATOR = wellKnownSymbol('iterator');
9var $Object = Object;
10
11module.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};