1 | // parses a syntax error for pretty-printing to console
|
2 | module.exports = parseError
|
3 | function parseError (err) {
|
4 | if (err.codeFrame) { // babelify@6.x
|
5 | return [err.message, err.codeFrame].join('\n\n')
|
6 | } else { // babelify@5.x and browserify
|
7 | return err.annotated || err.message
|
8 | }
|
9 | }
|