Skip to content

Instantly share code, notes, and snippets.

@tytrdev
Created December 26, 2019 02:25
Show Gist options
  • Save tytrdev/795bfd0f97e0dfb318e6d00d447dd22c to your computer and use it in GitHub Desktop.
Save tytrdev/795bfd0f97e0dfb318e6d00d447dd22c to your computer and use it in GitHub Desktop.
_read(n) {
this.bytesRead += n;
const value = this.buffer.toString('utf-8', this.bytesRead - n, this.bytesRead);
this.push(value || null);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment