2.0.0 • Published 10 months ago
@hexadrop/error v2.0.0
Installation
npm install --save @hexadrop/errorUsing bun
bun add @hexadrop/errorWhat it does
This package provides an opinionated base class for Domain Errors. This is meant to be extended and used as a base class for Domain Errors.
It is opinionated in the sense that it enforces a constructor with three arguments:
name: The name of the error.message: The message of the error.code: The code of the error. Must follow the next Regexp/[A-Z][A-Z][A-Z]\((\d{3}|\d{6})\)/. For exampleFNL(123)orRPA(435678)
How to use
import DomainError from '@hexadrop/error';
class EmptyErrorCodeError extends DomainError {
constructor() {
super('EmptyErrorCodeError', 'DomainError code can not be null or empty', 'HEX(400)');
}
}Hexadrop Code Quality Standards
Publishing this package we are committing ourselves to the following code quality standards:
- Respect Semantic Versioning: No breaking changes in patch or minor versions
- No surprises in transitive dependencies: Use the bare minimum dependencies needed to meet the purpose
- One specific purpose to meet without having to carry a bunch of unnecessary other utilities
- Tests as documentation and usage examples
- Well documented README showing how to install and use
- License favoring Open Source and collaboration
2.0.0
10 months ago
2.0.0-beta.2
2 years ago
2.0.0-beta.1
2 years ago
2.0.0-beta.0
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago
1.0.0-beta.2
2 years ago
1.0.0-beta.1
2 years ago
1.0.0-beta.0
2 years ago