Skip to content

Commit b646be4

Browse files
authored
Merge pull request #4163 from sawoz/patch-1
Add Node.Buffer.toStringWithEncoding
2 parents ae5a667 + f05dead commit b646be4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

jscomp/others/node_buffer.ml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,8 @@ external fromStringWithEncoding : string -> ([ `ascii | `utf8 | `utf16le | `u
3838
external toString : t -> string = "toString"
3939
[@@bs.send]
4040

41+
external toStringWithEncoding : t -> ([ `ascii | `utf8 | `utf16le | `usc2 | `base64 | `latin1 | `binary | `hex ] [@bs.string]) -> string = "toString"
42+
[@@bs.send]
43+
4144
external concat : t array -> t = "Buffer.concat"
4245
[@@bs.val]

0 commit comments

Comments
 (0)