@onesy/errors
v1.0.0
Published
Errors
Downloads
309
Maintainers
Readme
Getting started
Add
yarn add @onesy/errors
Use
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)
Dev
Install
yarn
Test
yarn test
Prod
Build
yarn build