0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-28 14:33:11 +01:00
nodejs/test/fixtures/es-module-loaders/hooks-initialize.mjs
Antoine du Hamel b64c3ee6cb
esm: remove return value for Module.register
The current API shape si not great because it's too limited and
redundant with the use of `MessagePort`.

PR-URL: https://github.com/nodejs/node/pull/49529
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
2023-09-09 12:44:28 +00:00

8 lines
154 B
JavaScript

import { writeFileSync } from 'node:fs';
let counter = 0;
export async function initialize() {
writeFileSync(1, `hooks initialize ${++counter}\n`);
}