UNPKG
choo-shortcache
Version:
latest (0.0.0)
0.0.0
choo nanocomponent cache shortcut
choo-shortcache
/
example
/
node_modules
/
watchify-middleware
/
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 } }