Socket
Book a DemoSign in
Socket

okay-error

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

okay-error - npm Package Compare versions

Comparing version
0.1.2
to
0.1.3
+1
-1
package.json
{
"name": "okay-error",
"version": "0.1.2",
"version": "0.1.3",
"author": "Henry Mao",

@@ -5,0 +5,0 @@ "private": false,

@@ -1,2 +0,2 @@

# `ok-err`
# `okay-error`

@@ -7,3 +7,3 @@ > **Typed, chain‑friendly, JSON‑safe Results for TypeScript**

## Why *ok-err*?
## Why *okay-error*?

@@ -21,3 +21,3 @@ * **Plain object compatibility** - an `Ok` is `{ ok: true, value }`, an `Err` is `{ ok: false, error }`. Log it, persist it, send it over the wire.

```bash
npm i ok-err
npm i okay-error
```

@@ -31,3 +31,3 @@

Here's how `ok-err` changes error handling from exceptions to data:
Here's how `okay-error` changes error handling from exceptions to data:

@@ -46,3 +46,3 @@ ```ts

// Alternative approach with Result
import { ok, err, result } from 'ok-err';
import { ok, err, result } from 'okay-error';

@@ -125,6 +125,6 @@ // Define functions that return Result types

`ok-err` can be used with async code to handle errors as data:
`okay-error` can be used with async code to handle errors as data:
```ts
import { result } from 'ok-err';
import { result } from 'okay-error';

@@ -131,0 +131,0 @@ // Wrap fetch with Result to handle both network and parsing errors