mirror of
https://github.com/denoland/deno.git
synced 2025-09-29 13:44:47 +00:00
parent
01147fab80
commit
fd1c913985
2 changed files with 16 additions and 0 deletions
|
@ -193,6 +193,11 @@
|
|||
}
|
||||
|
||||
function inspectFunction(value, _ctx) {
|
||||
if (customInspect in value && typeof value[customInspect] === "function") {
|
||||
try {
|
||||
return String(value[customInspect]());
|
||||
} catch {}
|
||||
}
|
||||
// Might be Function/AsyncFunction/GeneratorFunction
|
||||
const cstrName = Object.getPrototypeOf(value).constructor.name;
|
||||
if (value.name && value.name !== "anonymous") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue