UNPKG

util-ex

Version:

Browser-friendly enhanced util fully compatible with standard node.js

14 lines (13 loc) 409 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isIterable = isIterable; /** * Determines whether the given object is iterable. * @param {any} obj - The object to check. * @returns {obj is Iterable<any>} - Returns true if the object is iterable; otherwise, returns false. */ function isIterable(obj) { return !!obj && typeof obj[Symbol.iterator] === 'function'; }