1.0.0 • Published 5 months ago
@kayahr/assert v1.0.0
Assert
A large collection of generic TypeScript assert functions which can be used in unit tests but also in production code to validate inputs for example.
When an assertion fails an AssertionError is thrown with detailed information about what went wrong.
The assert library works in Node.js and browsers.
Usage
Install the library in your project (add -D parameter when only needed as dev dependency for unit tests):
npm install @kayahr/assertAnd the use it like this:
import { assertNotNull } from "@kayahr/assert";
assertNotNull(someValue);See API Doc for a list of all provided assert functions.
1.0.0
5 months ago