@scaffdog/error
v4.1.0
Published
A utility module of scaffdog error.
Downloads
153,577
Readme
@scaffdog/error
A utility module of scaffdog error.
Install
Install via npm:
$ npm install @scaffdog/error
Usage
import { error } from '@scaffdog/error';
const e = error('unexpected token', {
source: 'text {{ ] }}',
loc: {
start: { line: 1, column: 9 },
end: { line: 1, column: 9 },
},
});
console.log(e.format());
// unexpected token:
//
// > │ text {{ ] }}
// │ ^