You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
m3u8-downloader-TypeScript/scripts/utils.ts

12 lines
318 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`);
}
}