Skip to content

Possible improvement of "Read file stream line-by-line" example in readline doc  #5842

@vsemozhetbyt

Description

@vsemozhetbyt

https://nodejs.org/api/readline.html#readline_example_read_file_stream_line_by_line

Would it be for more efficiency, speed, resource saving and consistency to update this call:

const rl = readline.createInterface({
  input: fs.createReadStream('sample.txt')
});

with these options:

const rl = readline.createInterface({
  input: fs.createReadStream('sample.txt'),
  terminal: false,
  historySize: 0
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to the documentations.questionIssues that look for answers.readlineIssues and PRs related to the built-in readline module.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions