UNPKG

veffect

Version:

powerful TypeScript validation library built on the robust foundation of Effect combining exceptional type safety, high performance, and developer experience. Taking inspiration from Effect's functional principles, VEffect delivers a balanced approach tha

167 lines (166 loc) 4.59 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.toChunk = exports.toArray = exports.takeUpTo = exports.takeOption = exports.takeAll = exports.take = exports.size = exports.retainIf = exports.removeIf = exports.peekOption = exports.peek = exports.offerAll = exports.offer = exports.make = exports.isNonEmpty = exports.isEmpty = exports.fromIterable = exports.empty = exports.TPriorityQueueTypeId = void 0; var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("./internal/stm/tPriorityQueue.js")); function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } /** * @since 2.0.0 * @category symbols */ const TPriorityQueueTypeId = exports.TPriorityQueueTypeId = internal.TPriorityQueueTypeId; /** * Constructs a new empty `TPriorityQueue` with the specified `Order`. * * @since 2.0.0 * @category constructors */ const empty = exports.empty = internal.empty; /** * Creates a new `TPriorityQueue` from an iterable collection of values. * * @since 2.0.0 * @category constructors */ const fromIterable = exports.fromIterable = internal.fromIterable; /** * Checks whether the queue is empty. * * @since 2.0.0 * @category getters */ const isEmpty = exports.isEmpty = internal.isEmpty; /** * Checks whether the queue is not empty. * * @since 2.0.0 * @category getters */ const isNonEmpty = exports.isNonEmpty = internal.isNonEmpty; /** * Makes a new `TPriorityQueue` that is initialized with specified values. * * @since 2.0.0 * @category constructors */ const make = exports.make = internal.make; /** * Offers the specified value to the queue. * * @since 2.0.0 * @category mutations */ const offer = exports.offer = internal.offer; /** * Offers all of the elements in the specified collection to the queue. * * @since 2.0.0 * @category mutations */ const offerAll = exports.offerAll = internal.offerAll; /** * Peeks at the first value in the queue without removing it, retrying until a * value is in the queue. * * @since 2.0.0 * @category getters */ const peek = exports.peek = internal.peek; /** * Peeks at the first value in the queue without removing it, returning `None` * if there is not a value in the queue. * * @since 2.0.0 * @category getters */ const peekOption = exports.peekOption = internal.peekOption; /** * Removes all elements from the queue matching the specified predicate. * * @since 2.0.0 * @category getters */ const removeIf = exports.removeIf = internal.removeIf; /** * Retains only elements from the queue matching the specified predicate. * * @since 2.0.0 * @category getters */ const retainIf = exports.retainIf = internal.retainIf; /** * Returns the size of the queue. * * @since 2.0.0 * @category getters */ const size = exports.size = internal.size; /** * Takes a value from the queue, retrying until a value is in the queue. * * @since 2.0.0 * @category mutations */ const take = exports.take = internal.take; /** * Takes all values from the queue. * * @since 2.0.0 * @category mutations */ const takeAll = exports.takeAll = internal.takeAll; /** * Takes a value from the queue, returning `None` if there is not a value in * the queue. * * @since 2.0.0 * @category mutations */ const takeOption = exports.takeOption = internal.takeOption; /** * Takes up to the specified maximum number of elements from the queue. * * @since 2.0.0 * @category mutations */ const takeUpTo = exports.takeUpTo = internal.takeUpTo; /** * Collects all values into a `Chunk`. * * @since 2.0.0 * @category destructors */ const toChunk = exports.toChunk = internal.toChunk; /** * Collects all values into an array. * * @since 2.0.0 * @category destructors */ const toArray = exports.toArray = internal.toArray; //# sourceMappingURL=TPriorityQueue.js.map