Skip to content

Commit 79c6387

Browse files
authored
Merge pull request #10 from AlexErrant/us-ascii
Add "us-ascii"
2 parents 4f7f681 + 41fe006 commit 79c6387

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ export type SupportedEncoding =
22
| "utf-8"
33
| "utf8"
44
| "utf-16le"
5+
| "us-ascii"
56
| "ascii"
67
| "latin1"
78
| "iso-8859-1"
@@ -54,6 +55,7 @@ export function textDecode(
5455
}
5556
case "utf-16le":
5657
return decodeUTF16LE(bytes);
58+
case "us-ascii":
5759
case "ascii":
5860
return decodeASCII(bytes);
5961
case "latin1":
@@ -78,6 +80,7 @@ export function textEncode(
7880
}
7981
case "utf-16le":
8082
return encodeUTF16LE(input);
83+
case "us-ascii":
8184
case "ascii":
8285
return encodeASCII(input);
8386
case "latin1":

0 commit comments

Comments
 (0)