Skip to content

Commit

Permalink
doc: add added: info for string_decoder
Browse files Browse the repository at this point in the history
PR-URL: #6741
Ref: #6578
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
  • Loading branch information
Trott committed May 16, 2016
1 parent d73e189 commit eb089e7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions doc/api/string_decoder.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,22 @@ console.log(decoder.write(euro));
```

## Class: StringDecoder
<!-- YAML
added: v0.1.99
-->

Accepts a single argument, `encoding` which defaults to `'utf8'`.

### decoder.end()
<!-- YAML
added: v0.9.3
-->

Returns any trailing bytes that were left in the buffer.

### decoder.write(buffer)
<!-- YAML
added: v0.1.99
-->

Returns a decoded string.

0 comments on commit eb089e7

Please sign in to comment.