import { createCache } from "jsr:@deno/cache-dir@0.8.0";
import { createGraph } from "jsr:@deno/graph@0.69.7";
const { load } = createCache();
{
// the object returned by `load` is modified,
await createGraph("https://examples.deno.land/hello-world.ts", { load });
}
{
// which can lead to unexpected behavior elsewhere.
const res = await load("https://examples.deno.land/hello-world.ts");
if (res?.kind === "module") {
const content = res.content;
// this should print `true` but actually prints `false`.
console.log(typeof content === "string" || ArrayBuffer.isView(content));
}
}