UNPKG

iteragain

Version:

Javascript Iterable/Iterator/Generator-function utilities.

10 lines 473 B
/* asyncify(isAsyncIterable) */ /* ra(isIterable, isAsyncIterable) */ /* ra(' Iterable', ' AsyncIterable') */ /* ra('Symbol.iterator', 'Symbol.asyncIterator') */ /** Returns true if `arg` implements the `Symbol.iterator`, i.e. it's able to be passed to a `for of` loop. */ export function isIterable(arg) { return typeof (arg === null || arg === void 0 ? void 0 : arg[Symbol.iterator]) === 'function'; } export default isIterable; //# sourceMappingURL=isIterable.js.map