compound-ex4
Version:
Compound-ex4 - MVC framework for NodeJS (ExpressJs 4 version), fork compoundjs(https://github.com/1602/compound)
16 lines (12 loc) • 452 B
JavaScript
;
var isArguments = require('es5-ext/function/is-arguments')
, isString = require('es5-ext/string/is-string')
, iteratorSymbol = require('es6-symbol').iterator
, isArray = Array.isArray;
module.exports = function (value) {
if (value == null) return false;
if (isArray(value)) return true;
if (isString(value)) return true;
if (isArguments(value)) return true;
return (typeof value[iteratorSymbol] === 'function');
};