News for hackers. Stuff that matters.
Re:Deno on MDN by dfabulich on Monday August 23, 2021 @01:50PM (#28279493)
> The Deno-specific APIs (like Deno.readTextFile()[0]) are Promise-based and have intuitive interfaces

FYI, Node has Promise-based APIs for all filesystem APIs. Node also supports ES modules that use top-level await.

If you create a file `test.mjs` and put this in it, it'll work:

    import {readFile} from 'fs/promises';
    console.log(await readFile('foo.txt', 'utf8'));
https://nodejs.org/api/fs.html#fs_filehandle_readfile_option...
Re:Deno on MDN by binarynate on Monday August 23, 2021 @03:29PM (#28280801)
Thanks—I didn't know about fs/promises