All files / expect / _inspect_args.ts

50.00% Branches 1/2
100.00% Functions 2/2
100.00% Lines 9/9
1
2
3
4
5
6
7
8
9
10
11
12
13
 
 
 
x105
x22
x22
 
x105
x82
x82
x82
x82
x82









I

// Copyright 2018-2026 the Deno authors. MIT license.
// deno-lint-ignore-file

export function inspectArgs(args: unknown[]): string {
  return args.map(inspectArg).join(", ");
}

export function inspectArg(arg: unknown): string {
  const { Deno } = globalThis as any;
  return typeof Deno !== "undefined" && Deno.inspect
    ? Deno.inspect(arg)
    : String(arg);
}