This package is deprecated.
Wrapper classes for indeterminate data: Box and Result. Mutual properties exist for the possible states of a wrapper that help you determine that state and if content properties are valid to read from.
The default entrypoint exports all wrapper modules.
import { Box, Result } from "@deleteables/wrap"
If multiple entrypoints are supported, you can import a specific wrapper.
import { Box } from "@deleteables/wrap/box" import { Result } from "@deleteables/wrap/result"
Construct a box without arguments for an empty box. Construct a box with an argument for a full box that contains that argument. Consumers can directly access full
and data
with their own discretion or use class methods to interface with a box.
Construct a result with the first argument being true
for a success result. Construct a result with the first argument being false
for a failure result. The second argument in these constructors are placed in the data
property for success results or the reason
property for failure results. Consumers can directly access ok
and either data
or reason
with their own discretion or use class methods to interface with a result.
All files under this package are licensed as shown in the LICENSE file.
Add Package
deno add jsr:@deleteables/wrap
Import symbol
import * as wrap from "@deleteables/wrap";
---- OR ----
Import directly with a jsr specifier
import * as wrap from "jsr:@deleteables/wrap";
Add Package
npx jsr add @deleteables/wrap
Import symbol
import * as wrap from "@deleteables/wrap";
Add Package
yarn dlx jsr add @deleteables/wrap
Import symbol
import * as wrap from "@deleteables/wrap";
Add Package
pnpm dlx jsr add @deleteables/wrap
Import symbol
import * as wrap from "@deleteables/wrap";
Add Package
bunx jsr add @deleteables/wrap
Import symbol
import * as wrap from "@deleteables/wrap";