0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-30 09:08:00 -04:00
denoland-deno/cli/tests/testdata/compat/node_fs_promises.js
Bartek Iwańczuk 37a24c7bdf
feat(compat): add support for node: prefixed built-ins (#12337)
Adds support for "node:" prefix for Node built-ins in "--compat" mode.

As per https://nodejs.org/api/esm.html#esm_node_imports
2021-10-06 01:25:13 +02:00

3 lines
114 B
JavaScript

import fs from "node:fs/promises";
const data = await fs.readFile("compat/test.txt", "utf-8");
console.log(data);