UNPKG

iteragain

Version:

Javascript Iterable/Iterator/Generator-function utilities.

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