File tree 2 files changed +6
-7
lines changed
2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,12 @@ New features:
56
56
- ` INSPECT_MAX_BYTES ` : https://nodejs.org/docs/latest-v18.x/api/buffer.html#bufferinspect_max_bytes
57
57
- ` MAX_LENGTH ` : https://nodejs.org/docs/latest-v18.x/api/buffer.html#bufferconstantsmax_length
58
58
- ` MAX_STRING_LENGTH ` : https://nodejs.org/docs/latest-v18.x/api/buffer.html#bufferconstantsmax_string_length
59
- - Added a new data constructor for ` Encoding ` : ` Base64Url ` (#56 by @JordanMartinez )
59
+ - ` Encoding ` : Added/Removed data constructors (#56 by @JordanMartinez )
60
+
61
+ - Added: ` Base64Url `
62
+ - Removed aliases:
63
+ - ` Binary ` - use ` Latin1 ` instead
64
+ - ` UCS2 ` - use ` UTF16LE ` instead
60
65
61
66
Bugfixes:
62
67
Original file line number Diff line number Diff line change @@ -12,22 +12,18 @@ data Encoding
12
12
= ASCII
13
13
| UTF8
14
14
| UTF16LE
15
- | UCS2
16
15
| Base64
17
16
| Base64Url
18
17
| Latin1
19
- | Binary
20
18
| Hex
21
19
22
20
instance showEncoding :: Show Encoding where
23
21
show ASCII = " ASCII"
24
22
show UTF8 = " UTF8"
25
23
show UTF16LE = " UTF16LE"
26
- show UCS2 = " UCS2"
27
24
show Base64 = " Base64"
28
25
show Base64Url = " Base64Url"
29
26
show Latin1 = " Latin1"
30
- show Binary = " Binary"
31
27
show Hex = " Hex"
32
28
33
29
-- | Convert an `Encoding` to a `String` in the format expected by Node.js
@@ -36,11 +32,9 @@ encodingToNode :: Encoding -> String
36
32
encodingToNode ASCII = " ascii"
37
33
encodingToNode UTF8 = " utf8"
38
34
encodingToNode UTF16LE = " utf16le"
39
- encodingToNode UCS2 = " ucs2"
40
35
encodingToNode Base64 = " base64"
41
36
encodingToNode Base64Url = " base64url"
42
37
encodingToNode Latin1 = " latin1"
43
- encodingToNode Binary = " binary"
44
38
encodingToNode Hex = " hex"
45
39
46
40
foreign import byteLengthImpl :: Fn2 String String Int
You can’t perform that action at this time.
0 commit comments