@codenoobforreal/clitools
Version:
CLI tool for video processing (H.265/HEVC encoding & QuickTime compatibility) using FFmpeg, and batch lossless image compression with format preservation
19 lines • 823 B
JavaScript
/* eslint-disable @typescript-eslint/no-empty-object-type */
import { TASK_TYPE } from "./constants.js";
// https://stackoverflow.com/a/70887388
export function isErrnoException(error) {
return (isArbitraryObject(error) &&
error instanceof Error &&
(typeof error["errno"] === "number" ||
typeof error["errno"] === "undefined") &&
(typeof error["code"] === "string" ||
typeof error["code"] === "undefined") &&
(typeof error["path"] === "string" ||
typeof error["path"] === "undefined") &&
(typeof error["syscall"] === "string" ||
typeof error["syscall"] === "undefined"));
}
function isArbitraryObject(potentialObject) {
return typeof potentialObject === "object" && potentialObject !== null;
}
//# sourceMappingURL=types.js.map