Skip to content

doc: improve readable.unshift example

Rodrigo Muino Tomonari requested to merge github/fork/olalonde/patch-1 into master
Checklist
  • documentation is changed or added
  • the commit message follows commit guidelines
Affected core subsystem(s)

Doc

Description of change

The example would fail to work on a non utf-8 stream because var buf = Buffer.from(remaining, 'utf8'); would introduce unicode replacement characters if anything past the header was not utf-8 encoded. I believe the modified example fixes that issue.

Merge request reports

Loading