Socket
Socket
Sign inDemoInstall

@openally/result

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.1.0

1

dist/index.d.ts

@@ -22,2 +22,3 @@ declare class ErrImpl<E> {

unwrap(): T;
safeUnwrap(): T;
map<T2>(mapper: (val: T) => T2): OkImpl<T2>;

@@ -24,0 +25,0 @@ andThen<T2>(mapper: (val: T) => OkImpl<T2>): OkImpl<T2>;

@@ -44,2 +44,5 @@ var __defProp = Object.defineProperty;

}
safeUnwrap() {
return this.val;
}
map(mapper) {

@@ -88,4 +91,8 @@ return new OkImpl(mapper(this.val));

unwrap() {
throw new Error(`Tried to unwrap Error: ${toString(this.val)}
${this._stack}`);
const errorOptions = this.val instanceof Error ? { cause: this.val } : {};
throw new Error(
`Tried to unwrap Error: ${toString(this.val)}
${this._stack}`,
errorOptions
);
}

@@ -92,0 +99,0 @@ map(_mapper) {

5

package.json
{
"name": "@openally/result",
"version": "1.0.0",
"version": "1.1.0",
"description": "Another inspired Rust's Result implementation.",

@@ -15,2 +15,5 @@ "main": "./dist/index.js",

},
"engines": {
"node": ">=16.9.x"
},
"scripts": {

@@ -17,0 +20,0 @@ "build": "tsup src/index.ts --format cjs,esm --dts --clean",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc