Comparing version 1.2.1 to 1.3.0
@@ -9,3 +9,3 @@ "use strict"; | ||
if (typeof this.error === "string" || typeof this.error === "undefined") { | ||
const defaultMessage = "There was an error! No specific error message was provided."; | ||
var defaultMessage = "There was an error! No specific error message was provided."; | ||
throw new Error(message || this.error || defaultMessage); | ||
@@ -44,9 +44,9 @@ } | ||
function Ok(data) { | ||
return { ok: true, data, throw: throwErr, else: elseDo, or, and }; | ||
return { ok: true, data: data, throw: throwErr, else: elseDo, or: or, and: and }; | ||
} | ||
exports.Ok = Ok; | ||
function Err(error) { | ||
return { ok: false, error, throw: throwErr, else: elseDo, or, and }; | ||
return { ok: false, error: error, throw: throwErr, else: elseDo, or: or, and: and }; | ||
} | ||
exports.Err = Err; | ||
//# sourceMappingURL=main.js.map |
{ | ||
"name": "ts-res", | ||
"version": "1.2.1", | ||
"version": "1.3.0", | ||
"description": "TypeScript Result", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/Slava-Ini/ts-result", |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
18331
0