@scaffdog/error
TypeScript icon, indicating that this package has built-in type declarations

4.0.0 • Public • Published

@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 {{ ] }}
//   │         ^

Package Sidebar

Install

npm i @scaffdog/error

Weekly Downloads

28,981

Version

4.0.0

License

MIT

Unpacked Size

7.68 kB

Total Files

5

Last publish

Collaborators

  • wadackel