Skip to content

Commit

Permalink
support Deno.inspect
Browse files Browse the repository at this point in the history
  • Loading branch information
davidchambers committed Jun 16, 2021
1 parent de72203 commit b2b222b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
},
{
"files": ["index.js"],
"globals": {"Deno": false},
"rules": {
"multiline-comment-style": ["off"]
}
Expand Down
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2781,6 +2781,12 @@
wrapNext ({}, [], 0);

wrapped[inspect] = wrapped.toString = always0 (typeSignature (typeInfo));
/* istanbul ignore if */
if (typeof Deno !== 'undefined') {
if (Deno != null && typeof Deno.customInspect === 'symbol') {
wrapped[Deno.customInspect] = wrapped.toString;
}
}

return wrapped;
}
Expand Down

0 comments on commit b2b222b

Please sign in to comment.