Catch Errors before they become Fatal
npm install xrays!Xrays — Catch Errors before they become Fatal
> An Open Source Universe Project
---
- xrays
- Contents
- Features ✨
- Install 🛠
- Usage 🔭
- Documentation 🛰
- Contributing 🌎
- License ⚖️
- Catches Errors Before they become Fatal
- 0 Dependencies
- Typescript Support
``sh`
npm install xrays
Read more about the Design behind xrays here.
`typescript
import { x } from 'xrays';
const throwable = async (shouldThrow: boolean) => {
if (shouldThrow) {
throw new Error('error');
}
return 'success';
}
const { data, error } = await x(throwable, false);
// { data: 'success', error: null }
const { data, error } = await x(throwable, true);
// { data: null, error: Error('error') }
`
xrays is under active development, documentation will be added once an initial release is ready.
We would love for you to contribute your ideas, code, & fixes to xrays`.
We encourage everyone to read our Design Document to learn more about the thought process behind xrays.
Also check out the rewards offered for contributing to the Open Source Universe.
MIT