@bunito/common
v0.0.15
Published
Shared exceptions, predicates, type helpers, and utilities for bunito packages.
Maintainers
Readme
@bunito/common
Shared exceptions, predicates, type helpers, and small utilities for bunito packages.
This package is framework-agnostic and is used by the rest of the bunito workspace.
Installation 📦
bun add @bunito/commonUsage ✨
import { AbstractException, isObject } from '@bunito/common';
class AppException extends AbstractException {
constructor(message?: string) {
super(message);
this.name = 'AppException';
}
}
const value: unknown = { ok: true };
if (!isObject(value)) {
AppException.throw`Expected an object.`;
}License
MIT
