Node-Red configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

is-iterable.js 570B

1234567891011121314151617
  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. var ITERATOR = wellKnownSymbol('iterator');
  8. var $Object = Object;
  9. module.exports = function (it) {
  10. if (isNullOrUndefined(it)) return false;
  11. var O = $Object(it);
  12. return O[ITERATOR] !== undefined
  13. || '@@iterator' in O
  14. || hasOwn(Iterators, classof(O));
  15. };