项目文件夹

文件
T
2024-06-22 10:44:34 +08:00

12 行
317 B
TypeScript

import { ProcessOutput } from "zx/core";
export function printObject(
object: Record<string, unknown> | ProcessOutput,
method: "log" | "warn" | "error" = "log"
) {
for (const [key, value] of Object.entries(object)) {
// eslint-disable-next-line no-console
console[method](`${key}:\n${value}\n`);
}
}