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 authored and evanlucas committed May 17, 2016
1 parent 688f563 commit 9196d87
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 9196d87

Please sign in to comment.