summaryrefslogtreecommitdiff
path: root/std/node/_utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/node/_utils.ts')
-rw-r--r--std/node/_utils.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/std/node/_utils.ts b/std/node/_utils.ts
index 66b7b10d9..0e8b26fb5 100644
--- a/std/node/_utils.ts
+++ b/std/node/_utils.ts
@@ -65,8 +65,9 @@ function slowCases(enc: string): string | undefined {
if (enc === "ucs2") return "utf16le";
break;
case 3:
- if (enc === "hex" || enc === "HEX" || `${enc}`.toLowerCase() === "hex")
+ if (enc === "hex" || enc === "HEX" || `${enc}`.toLowerCase() === "hex") {
return "hex";
+ }
break;
case 5:
if (enc === "ascii") return "ascii";
@@ -93,16 +94,18 @@ function slowCases(enc: string): string | undefined {
enc === "utf16le" ||
enc === "UTF16LE" ||
`${enc}`.toLowerCase() === "utf16le"
- )
+ ) {
return "utf16le";
+ }
break;
case 8:
if (
enc === "utf-16le" ||
enc === "UTF-16LE" ||
`${enc}`.toLowerCase() === "utf-16le"
- )
+ ) {
return "utf16le";
+ }
break;
default:
if (enc === "") return "utf8";