mirror of
https://github.com/JasonYANG170/IOTConnect-Web.git
synced 2024-11-23 20:26:28 +00:00
17 lines
507 B
JavaScript
17 lines
507 B
JavaScript
|
"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";
|
||
|
};
|