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.
 
 
 

16 lines
360 B

"use strict";
var typeOf = require("@sinonjs/commons").typeOf;
/**
* Returns `true` for iterables
*
* @private
* @param {*} value A value to examine
* @returns {boolean} Returns `true` when `value` looks like an iterable
*/
function isIterable(value) {
return Boolean(value) && typeOf(value.forEach) === "function";
}
module.exports = isIterable;