All files / expect / _inspect_args.ts

0.00% Branches 0/1
66.67% Lines 6/9
1
2
3
4
5
6
7
8
9
10
11
12
13
 
 
 
x101
x123
x123
 
x101
x183
 
 
 
x183









I

// Copyright 2018-2025 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);
}