# errd

> Collection of error handling utilities for JavaScript and TypeScript.

Latest version **1.0.0** (published 2023-04-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install errd
pnpm add errd
yarn add errd
bun add errd
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-04-15 |
| First published | 2023-04-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 0 |
| Unpacked size | 17.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | agent-ly |
| Keywords | error, rust, result, option, ok, err, some, none, go, try |

## Links

- npm: https://www.npmjs.com/package/errd
- Repository: https://github.com/agent-ly/errd
- Homepage: https://github.com/agent-ly/errd#readme
- Issues: https://github.com/agent-ly/errd/issues
- npm.io page: https://npm.io/package/errd

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [@temporal-architect/claude-plugin](https://npm.io/package/@temporal-architect/claude-plugin.md) — 335 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2023-04-15
- 0.0.2 — 2023-04-10
- 0.0.1 — 2023-04-09

## README

# errd

> Collection of error handling utilities for JavaScript and TypeScript.

## Usage

```ts
import { Ok /* Err, type Result */ } from "errd/result";
const result = Ok(42);
if (result.isOk()) console.log(result.unwrap());
else console.error(result.unwrapErr());
```

```ts
import { Some /* None, type Option */ } from "errd/option";
const maybe = Some(1);
if (maybe.isSome()) console.log(result.unwrap());
else console.log("none");
```

```ts
import { Try } from "errd/try";
const [err, result] = Try.from(() => 42);
const [err2, result2] = Try.fromAsync(() => fetch("https://..."));
```

```ts
import {
  normalizeError /* isError, isErrnoException, isErrorLike, */,
} from "errd/util";
try {
  throw new Error("oops");
} catch (error) {
  normalized = normalizeError(error);
  console.error(error);
}
```

---
_Source: https://npm.io/package/errd · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
