File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ var result = bencode.decode( data )
8585Automagically convert bytestrings to strings:
8686
8787``` javascript
88- var result = bencode .decode ( data, true )
88+ var result = bencode .decode ( data, ' utf8 ' )
8989```
9090
9191#### Output
@@ -109,12 +109,12 @@ var result = bencode.decode( data, true )
109109
110110Returns ` String `
111111
112- ### bencode.decode( * data* , * toString * )
112+ ### bencode.decode( * data* , * encoding * )
113113
114114> ` Buffer ` __ data__
115- > ` Boolean ` __ toString __
115+ > ` Boolean ` __ encoding __
116116
117- If ` toString ` is set to something truthy,
118- bytestrings are automatically converted to strings.
117+ If ` encoding ` is set, bytestrings are
118+ automatically converted to strings.
119119
120120Returns ` Object ` | ` Array ` | ` Buffer ` | ` String ` | ` Number `
You can’t perform that action at this time.
0 commit comments