@the-minimal/error
v0.1.2
Published
Minimalist TypeScript error library with great focus on size and performance
Downloads
9
Maintainers
Readme
Example
const AssertionError = error<string>("AssertionError");
// ..
if(typeof value !== "number") {
AssertionError("number", `Value ${value} should be of type number`);
}
Install
yarn add @the-minimal/error
Benchmark
- Blue = baseline
- Orange =
Error
- Green =
@the-minimal/error