UNPKG
dump-die
Version:
latest (1.0.0)
1.0.0
0.1.0
Dump an object and kill the process in node.js
github.com/spatie/dump-die
spatie/dump-die
dump-die
/
lib
/
dd.js
15 lines
(10 loc)
•
253 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
'use strict'
const
inspect =
require
(
'./inspect'
)
const
process =
require
(
'process'
)
function
dd
(
) {
Array
.
prototype
.
slice
.
call
(
arguments
).
forEach
(
(
thing
) =>
{
console
.
log
(
inspect
(thing)) }) process.
exit
(
1
) }
module
.
exports
= dd