UNPKG

457 BJavaScriptView Raw
1/**
2 * Determines whether the given async-iterable is empty.
3 *
4 * @export
5 * @template T The type of elements in the source sequence.
6 * @param {Iterable<T>} source The source async-iterable to determine whether it is empty.
7 * @returns {boolean} Returns true if the sequence is empty, otherwise false.
8 */
9export function isEmpty(source) {
10 for (const _ of source) {
11 return false;
12 }
13 return true;
14}
15
16//# sourceMappingURL=isempty.mjs.map