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

166 lines (164 loc) 4.82 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.render = exports.make = exports.isEnabled = exports.isEmpty = exports.isDisabled = exports.isActive = exports.inverse = exports.includes = exports.exclude = exports.enabledSet = exports.enable = exports.empty = exports.either = exports.disabledSet = exports.disable = exports.both = exports.andThen = void 0; var runtimeFlags = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("./internal/runtimeFlags.js")); var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("./internal/runtimeFlagsPatch.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 */ /** * The empty `RuntimeFlagsPatch`. * * @since 2.0.0 * @category constructors */ const empty = exports.empty = internal.empty; /** * @since 2.0.0 * @category constructors */ const make = exports.make = internal.make; /** * Creates a `RuntimeFlagsPatch` describing enabling the provided `RuntimeFlag`. * * @since 2.0.0 * @category constructors */ const enable = exports.enable = internal.enable; /** * Creates a `RuntimeFlagsPatch` describing disabling the provided `RuntimeFlag`. * * @since 2.0.0 * @category constructors */ const disable = exports.disable = internal.disable; /** * Returns `true` if the specified `RuntimeFlagsPatch` is empty. * * @since 2.0.0 * @category getters */ const isEmpty = exports.isEmpty = internal.isEmpty; /** * Returns `true` if the `RuntimeFlagsPatch` describes the specified * `RuntimeFlag` as active. * * @since 2.0.0 * @category elements */ const isActive = exports.isActive = internal.isActive; /** * Returns `true` if the `RuntimeFlagsPatch` describes the specified * `RuntimeFlag` as enabled. * * @since 2.0.0 * @category elements */ const isEnabled = exports.isEnabled = internal.isEnabled; /** * Returns `true` if the `RuntimeFlagsPatch` describes the specified * `RuntimeFlag` as disabled. * * @since 2.0.0 * @category elements */ const isDisabled = exports.isDisabled = internal.isDisabled; /** * Returns `true` if the `RuntimeFlagsPatch` includes the specified * `RuntimeFlag`, `false` otherwise. * * @since 2.0.0 * @category elements */ const includes = exports.includes = internal.isActive; /** * Creates a `RuntimeFlagsPatch` describing the application of the `self` patch, * followed by `that` patch. * * @since 2.0.0 * @category utils */ const andThen = exports.andThen = internal.andThen; /** * Creates a `RuntimeFlagsPatch` describing application of both the `self` patch * and `that` patch. * * @since 2.0.0 * @category utils */ const both = exports.both = internal.both; /** * Creates a `RuntimeFlagsPatch` describing application of either the `self` * patch or `that` patch. * * @since 2.0.0 * @category utils */ const either = exports.either = internal.either; /** * Creates a `RuntimeFlagsPatch` which describes exclusion of the specified * `RuntimeFlag` from the set of `RuntimeFlags`. * * @category utils * @since 2.0.0 */ const exclude = exports.exclude = internal.exclude; /** * Creates a `RuntimeFlagsPatch` which describes the inverse of the patch * specified by the provided `RuntimeFlagsPatch`. * * @since 2.0.0 * @category utils */ const inverse = exports.inverse = internal.inverse; /** * Returns a `ReadonlySet<number>` containing the `RuntimeFlags` described as * enabled by the specified `RuntimeFlagsPatch`. * * @since 2.0.0 * @category destructors */ const enabledSet = exports.enabledSet = runtimeFlags.enabledSet; /** * Returns a `ReadonlySet<number>` containing the `RuntimeFlags` described as * disabled by the specified `RuntimeFlagsPatch`. * * @since 2.0.0 * @category destructors */ const disabledSet = exports.disabledSet = runtimeFlags.disabledSet; /** * Renders the provided `RuntimeFlagsPatch` to a string. * * @since 2.0.0 * @category destructors */ const render = exports.render = runtimeFlags.renderPatch; //# sourceMappingURL=RuntimeFlagsPatch.js.map