UNPKG

iter-tools-es

Version:
19 lines (15 loc) 372 B
const { iterableCurry } = require('../../internal/iterable.js'); const { __firstOr } = require('../$first-or/first-or.js'); const none = Symbol('none'); function __isEmpty(iterable) { return __firstOr(iterable, none) === none; } exports.__isEmpty = __isEmpty; const isEmpty = /*#__PURE__*/iterableCurry(__isEmpty, { reduces: true }); exports.isEmpty = isEmpty;