We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 900e462 commit eaa8e20Copy full SHA for eaa8e20
src/node/internal/internal_utils.ts
@@ -50,7 +50,8 @@ export function normalizeEncoding(enc?: string): Encoding | undefined {
50
51
export function getEncodingOps(enc: unknown): Encoding | undefined {
52
if (enc === undefined) return UTF8;
53
- let encoding = String(enc);
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
54
+ let encoding = `${enc}`;
55
switch (encoding.length) {
56
case 4:
57
if (encoding === 'UTF8') return UTF8;
0 commit comments