code: function utf8End(buf) {
    var r = buf && buf.length ? this.write(buf) : '';
    if (this.lastNeed) return r + '\ufffd'.repeat(this.lastTotal - this.lastNeed);
    return r;
  }
docs: For UTF-8, a replacement character for each buffered byte of a (partial) character needs to be added to the output.