@xylabs/assert
Advanced tools
Comparing version 3.3.2 to 3.3.3
@@ -7,3 +7,3 @@ // src/index.ts | ||
const errorOrMessage = messageOrFunc(expr); | ||
throw typeof errorOrMessage === "string" ? Error(errorOrMessage) : errorOrMessage; | ||
throw typeof errorOrMessage === "string" ? new Error(errorOrMessage) : errorOrMessage; | ||
} | ||
@@ -10,0 +10,0 @@ throw new Error(messageOrFunc); |
@@ -7,3 +7,3 @@ // src/index.ts | ||
const errorOrMessage = messageOrFunc(expr); | ||
throw typeof errorOrMessage === "string" ? Error(errorOrMessage) : errorOrMessage; | ||
throw typeof errorOrMessage === "string" ? new Error(errorOrMessage) : errorOrMessage; | ||
} | ||
@@ -10,0 +10,0 @@ throw new Error(messageOrFunc); |
@@ -7,3 +7,3 @@ // src/index.ts | ||
const errorOrMessage = messageOrFunc(expr); | ||
throw typeof errorOrMessage === "string" ? Error(errorOrMessage) : errorOrMessage; | ||
throw typeof errorOrMessage === "string" ? new Error(errorOrMessage) : errorOrMessage; | ||
} | ||
@@ -10,0 +10,0 @@ throw new Error(messageOrFunc); |
@@ -31,4 +31,4 @@ { | ||
"devDependencies": { | ||
"@xylabs/ts-scripts-yarn3": "^3.10.0", | ||
"@xylabs/tsconfig": "^3.10.0", | ||
"@xylabs/ts-scripts-yarn3": "^3.10.4", | ||
"@xylabs/tsconfig": "^3.10.4", | ||
"typescript": "^5.4.5" | ||
@@ -54,4 +54,4 @@ }, | ||
"sideEffects": false, | ||
"version": "3.3.2", | ||
"version": "3.3.3", | ||
"type": "module" | ||
} |
@@ -25,3 +25,3 @@ export type AssertExMessageFunc<T> = (value?: T | null) => string | ||
const errorOrMessage = messageOrFunc(expr) | ||
throw typeof errorOrMessage === 'string' ? Error(errorOrMessage) : errorOrMessage | ||
throw typeof errorOrMessage === 'string' ? new Error(errorOrMessage) : errorOrMessage | ||
} | ||
@@ -28,0 +28,0 @@ // a string was sent |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
43224