A utility module of scaffdog error.
npm install @scaffdog/errorA utility module of scaffdog error.
Install via npm:
``bash`
$ npm install @scaffdog/error
`typescript
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 {{ ] }}
// │ ^
``