$ curl 'https://api.github.com/user/repos?page=2&per_page=100'
import { EventEmitter } from "node:events";
/**
* add "type":"module" in package.json
*/
class MyEmitter extends EventEmitter {}
const myEvent = new MyEmitter();
myEvent.on("event", () => {
console.log("an event occurred!");
});
myEvent.emit("event");