node-result
Advanced tools
Comparing version 8.0.0 to 8.1.0
@@ -16,2 +16,3 @@ export { ResultError } from 'node-result-error'; | ||
isFail(): boolean; | ||
isOkAndUnwrap(): [boolean, D | E]; | ||
} | ||
@@ -18,0 +19,0 @@ export declare class ResultOK<D> extends Result<D, null> { |
@@ -41,2 +41,8 @@ "use strict"; | ||
} | ||
isOkAndUnwrap() { | ||
if (this.error === null) { | ||
return [true, this.data]; | ||
} | ||
return [false, this.error]; | ||
} | ||
} | ||
@@ -43,0 +49,0 @@ exports.Result = Result; |
{ | ||
"name": "node-result", | ||
"version": "8.0.0", | ||
"version": "8.1.0", | ||
"description": "result", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8032
143