Errors
Very simple code Modern code Junior friendly Typescript Made with 💛
yarn add @onesy/errors
import { OnesyError } from '@onesy/errors';
import OnesyLog from '@onesy/log';
const onesyError = new OnesyError('a');
onesyError.name;
onesyError.message;
onesyError.added_at;
onesyError.stack;
// OnesyError
// 'a'
// 1643893234
// 'OnesyError: a\n at eval (eval at evaluate (:3:2389), <anonymous>:2:31)\n at t.default.evaluate (<anonymous>:3:2412)\n at t.default.<anonymous> (<anonymous>:1:44)'
OnesyLog.error(onesyError);
// Output
// 04-04-2014 04:04:14.141 (error):
// a
// OnesyError: a
// at eval (eval at evaluate (:3:2389), <anonymous>:2:31)
// at t.default.evaluate (<anonymous>:3:2412)
// at t.default.<anonymous> (<anonymous>:1:44)
Install
yarn
Test
yarn test
Build
yarn build