项目原始demo,不改动
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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 

11 rivejä
373 B

  1. var classof = require('./_classof');
  2. var ITERATOR = require('./_wks')('iterator');
  3. var Iterators = require('./_iterators');
  4. module.exports = require('./_core').isIterable = function (it) {
  5. var O = Object(it);
  6. return O[ITERATOR] !== undefined
  7. || '@@iterator' in O
  8. // eslint-disable-next-line no-prototype-builtins
  9. || Iterators.hasOwnProperty(classof(O));
  10. };