UNPKG

iteragain

Version:

Javascript Iterable/Iterator/Generator-function utilities.

9 lines 393 B
/* asyncify(isAsyncIterator) */ /* ra(isIterator, isAsyncIterator) */ /* ra(' Iterator', ' AsyncIterator') */ /** Returns true if `arg` implements the "Iterator" interface, i.e. it has a `next` method. */ export function isIterator(arg) { return typeof (arg === null || arg === void 0 ? void 0 : arg.next) === 'function'; } export default isIterator; //# sourceMappingURL=isIterator.js.map