We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a54ea03 + 5077936 commit 94f5939Copy full SHA for 94f5939
jscomp/others/node_buffer.ml
@@ -31,3 +31,9 @@ external isBuffer : 'a -> bool = "Buffer.isBuffer"
31
32
external fromString : string -> t = "Buffer.from"
33
[@@bs.val]
34
+
35
+external fromStringWithEncoding : string -> ([ `ascii | `utf8 | `utf16le | `usc2 | `base64 | `latin1 | `binary | `hex ] [@bs.string]) -> t = "from"
36
+[@@bs.val] [@@bs.scope "Buffer"]
37
38
+external toString : t -> string = ""
39
+[@@bs.send] [@@bs.scope "Buffer"]
0 commit comments