Yeet errors inline.
License: MIT
npm install @bussin/yeet
import { yeet } from '@bussin/yeet';
function myFunc(nullish?: string) {
const notNullish = nullish ?? yeet(Error, 'Argument "nullish" is missing.');
console.log(notNullish);
// ...
}
myFunc('not nullish!');
myFunc(); // throws
To contribute, all PRs should target the develop
branch. Feature branches must be rebased onto the latest develop
commit before merging to keep a linear git history.
Package releases are started by manually triggering the Bump Version GitHub Action. The Bump Version action will create a release commit with the version bump and an associated git tag, and automatically start the Build and Publish GitHub Action. The Build and Publish action requires a manual approval step from a repository admin. Once approved, the package will be published to the NPM registry.
Please create a PR if you find any missing functionality that you's like to add. For bugs, please use the issues tracker. I'd be happy to help you!