14 lines
352 B
JavaScript
14 lines
352 B
JavaScript
'use strict';
|
|
|
|
var 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;
|
|
return (typeof value[iteratorSymbol] === 'function');
|
|
};
|