(content: string | Uint8Array)
| 72 | } |
| 73 | |
| 74 | async function materialize(content: string | Uint8Array): Promise<Uint8Array> { |
| 75 | if (typeof content === "string") { |
| 76 | return new TextEncoder().encode(content); |
| 77 | } |
| 78 | return content; |
| 79 | } |
| 80 | |
| 81 | // sha256 with a synchronous code path so writeFile can be called both |
| 82 | // from async drivers (the FS API) and from sync drivers (the |