node.js中所有内置事件的列表?
在nodejs文档中,我遇到了“可读”,“数据”,“结束”等多个事件名称。
例如:
process.stdin.on('readable', () => { var chunk = process.stdin.read(); if (chunk !== null) { process.stdout.write(`data: ${chunk}`); } });
我在https://nodejs.org/api/process.htmlfind了这个。
我在哪里可以find所有内置的事件名称的列表,有一些解释和何时被解雇。
事件文档遍布在node.js文档中。 例如, https://nodejs.org/api/events.html
如果你想在特定的模块中查找,例如http
模块, https://nodejs.org/api/http.html#http_class_http_clientrequest你也可以看看http
有哪些事件。