is.js 342 B

1234567891011
  1. "use strict";
  2. var iteratorSymbol = require("es6-symbol").iterator
  3. , isValue = require("../object/is-value")
  4. , isArrayLike = require("../object/is-array-like");
  5. module.exports = function (value) {
  6. if (!isValue(value)) return false;
  7. if (typeof value[iteratorSymbol] === "function") return true;
  8. return isArrayLike(value);
  9. };