fix(cli): make CLI compatible with Node 18

This commit is contained in:
Ruben Fiszel
2024-09-20 11:10:19 +02:00
parent 2a9d1b587b
commit 8212532b29
+6 -2
View File
@@ -3,6 +3,7 @@
// @ts-nocheck This file is copied from a JS project, so it's not type-safe.
import { log, encodeHex, SEP } from "./deps.ts";
import crypto from "node:crypto";
export function deepEqual<T>(a: T, b: T): boolean {
if (a === b) return true;
@@ -132,6 +133,9 @@ export function sleep(ms: number) {
export function isFileResource(path: string): boolean {
const splitPath = path.split(".");
return splitPath.length >= 4 && splitPath[1] == "resource" && splitPath[2] == "file";
return (
splitPath.length >= 4 &&
splitPath[1] == "resource" &&
splitPath[2] == "file"
);
}