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.
17 lines
507 B
17 lines
507 B
1 year ago
|
"use strict";
|
||
|
|
||
|
var isArguments = require("es5-ext/function/is-arguments")
|
||
|
, isValue = require("es5-ext/object/is-value")
|
||
|
, isString = require("es5-ext/string/is-string");
|
||
|
|
||
|
var iteratorSymbol = require("es6-symbol").iterator
|
||
|
, isArray = Array.isArray;
|
||
|
|
||
|
module.exports = function (value) {
|
||
|
if (!isValue(value)) return false;
|
||
|
if (isArray(value)) return true;
|
||
|
if (isString(value)) return true;
|
||
|
if (isArguments(value)) return true;
|
||
|
return typeof value[iteratorSymbol] === "function";
|
||
|
};
|