UNPKG
coffee
Version:
latest (5.5.1)
latest-3 (3.3.3)
latest-4 (4.2.1)
5.5.1
5.5.0
5.4.0
5.3.0
5.2.2
5.2.1
5.2.0
5.1.1
5.1.0
5.0.1
4.2.1
4.2.0
4.1.0
4.0.1
4.0.0
3.3.3
3.3.2
3.3.1
3.3.0
3.2.5
3.2.4
3.2.3
3.2.2
3.2.1
3.2.0
3.1.1
3.1.0
3.0.3
3.0.2
3.0.1
3.0.0
2.1.0
2.0.0
1.3.1
1.3.0
1.2.0
1.1.0
1.0.1
1.0.0
0.1.0
Test command line on nodejs
github.com/popomore/coffee
popomore/coffee
coffee
/
lib
/
show.js
11 lines
(9 loc)
•
310 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
'use strict'
;
module
.
exports
=
function
show
(
obj
) {
if
(obj
instanceof
Buffer
) { obj = obj.
toString
(); }
// escape \n to \\n for good view in terminal
return
(
typeof
obj ===
'string'
? obj.
replace
(
/\n/g
,
'\\n'
) : obj) +
'('
+ {}.
toString
.
call
(obj).
replace
(
/^\[object (.*)\]$/
,
'$1'
) +
')'
; };