rustic-error
Advanced tools
Comparing version
{ | ||
"name": "rustic-error", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "Robust and type-safe error management inspired by Rust's Result pattern", | ||
@@ -5,0 +5,0 @@ "author": "Bluzzi", |
@@ -6,2 +6,5 @@ # Rustic Error | ||
```ts | ||
import type { Result } from "rustic-error"; | ||
import { ok, error } from "rustic-error"; | ||
function divide(a: number, b: number): Result<number, string> { | ||
@@ -8,0 +11,0 @@ if (b === 0) return error("Division by zero"); |
@@ -1,1 +0,6 @@ | ||
export * from "#/result"; | ||
// Result functions: | ||
export * from "#/result"; | ||
// Typing: | ||
export * from "#/typing/promise"; | ||
export * from "#/typing/result"; |
@@ -1,2 +0,3 @@ | ||
export * from "./result.func"; | ||
export * from "./result.type"; | ||
export * from "./ok"; | ||
export * from "./error"; | ||
export * from "./resultify"; |
11178
87.61%25
66.67%170
214.81%22
15.79%