UNPKG
hihat
Version:
latest (2.6.4)
2.6.4
2.6.3
2.6.2
2.6.1
2.6.0
2.5.0
2.4.3
2.4.2
2.4.1
2.4.0
2.3.0
2.2.1
2.2.0
2.1.0
2.0.1
2.0.0
1.2.1
1.1.2
1.1.1
1.1.0
1.0.1
1.0.0
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
0.0.0
local Node/Browser development with Chrome DevTools
github.com/Jam3/hihat
Jam3/hihat
hihat
/
lib
/
parse-error.js
10 lines
(9 loc)
•
292 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
// parses a syntax error for pretty-printing to console
module
.
exports
= parseError function
parseError
(err)
{
if
(err.codeFrame) {
// babelify@6.x
return
[err.message, err.codeFrame].join(
'\n\n'
) }
else
{
// babelify@5.x and browserify
return
err.annotated || err.message } }