Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details โ†’
Socket
Book a DemoInstallSign in
Socket

tuple-result

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

tuple-result - npm Package Compare versions

Comparing version
0.0.9
to
0.0.10
+1
-1
dist/types/index.d.ts

@@ -163,3 +163,3 @@ /**

/**
* Extracts the value from a result, returning null if it's an error.
* Extracts the value from a result, returning undefined if it's an error.
* @param result - The result to unwrap

@@ -166,0 +166,0 @@ * @returns The success value or undefined

{
"name": "tuple-result",
"version": "0.0.9",
"version": "0.0.10",
"private": false,

@@ -26,5 +26,5 @@ "description": "A minimal, functional, and tree-shakable Result library for TypeScript that prioritizes simplicity and serialization",

"devDependencies": {
"@types/node": "^24.3.0",
"@blgc/config": "0.0.38",
"rollup-presets": "0.0.24"
"@types/node": "^24.10.0",
"rollup-presets": "0.0.25",
"@blgc/config": "0.0.39"
},

@@ -31,0 +31,0 @@ "size-limit": [

@@ -114,4 +114,4 @@ <h1 align="center">

const message = match(result, {
ok: (value) => `Success: ${value}`,
err: (error) => `Error: ${error}`
ok: (value) => `Success: ${value}`,
err: (error) => `Error: ${error}`
});

@@ -121,4 +121,4 @@

const processed = match(result, {
ok: (user) => ({ ...user, displayName: user.name.toUpperCase() }),
err: (error) => ({ id: 0, name: 'Unknown', error: error.message })
ok: (user) => ({ ...user, displayName: user.name.toUpperCase() }),
err: (error) => ({ id: 0, name: 'Unknown', error: error.message })
});

@@ -257,4 +257,4 @@ ```

const message = match(result, {
ok: (value) => `Success: ${value}`,
err: (error) => `Error: ${error}`
ok: (value) => `Success: ${value}`,
err: (error) => `Error: ${error}`
});

@@ -338,5 +338,5 @@ ```

// These all work the same way
unwrapOr(Ok(42), 0); // โœ… TResult
unwrapOr(Ok(42), 0); // โœ… TResult
unwrapOr([true, undefined, 42], 0); // โœ… TResultArray
unwrapOr(someResult, 0); // โœ… Either type
unwrapOr(someResult, 0); // โœ… Either type
```

@@ -343,0 +343,0 @@