Skip to content

Commit

Permalink
Add TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoffreyBooth committed Sep 26, 2023
1 parent 6f0e209 commit 3ca8412
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/internal/modules/esm/formats.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ function getFormatOfExtensionlessFile(url) {
const magic = new Uint8Array(4);
let fd;
try {
// TODO(@anonrig): Optimize the following by having a single C++ call
fd = openSync(url);
readSync(fd, magic, 0, 4); // Only read the first four bytes
if (magic[0] === 0x00 && magic[1] === 0x61 && magic[2] === 0x73 && magic[3] === 0x6d) {
Expand Down

0 comments on commit 3ca8412

Please sign in to comment.