File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -322,12 +322,17 @@ Create an `AsyncIterator` object that iterates through each line in the input
322
322
stream as a string. This method allows asynchronous iteration of
323
323
` readline.Interface ` objects through ` for ` -` await ` -` of ` loops.
324
324
325
- * Note: * Errors in the input stream are not forwarded.
325
+ Errors in the input stream are not forwarded.
326
326
327
327
If the loop is terminated with ` break ` , ` throw ` , or ` return ` ,
328
328
[ ` rl.close() ` ] [ ] will be called. In other words, iterating over a
329
329
` readline.Interface ` will always consume the input stream fully.
330
330
331
+ A caveat with using this experimental API is that the performance is
332
+ currently not on par with the traditional ` 'line' ` event API, and thus it is
333
+ not recommended for performance-sensitive applications. We expect this
334
+ situation to improve in the future.
335
+
331
336
``` js
332
337
async function processLineByLine () {
333
338
const rl = readline .createInterface ({
You can’t perform that action at this time.
0 commit comments