Skip to content

Commit

Permalink
Merge pull request #302 from sanctuary-js/davidchambers/deno-inspect
Browse files Browse the repository at this point in the history
support Deno.inspect
  • Loading branch information
davidchambers authored Jun 16, 2021
2 parents de72203 + b2b222b commit 2ac4810
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 2ac4810

Please sign in to comment.