(enc)
| 76 | }; |
| 77 | const kEmptyObject = Object.freeze({ __proto__: null }); |
| 78 | const normalizeEncoding = (enc) => { |
| 79 | if (enc == null || enc === "utf8" || enc === "utf-8") return "utf8"; |
| 80 | switch (String(enc).toLowerCase()) { |
| 81 | case "utf8": case "utf-8": return "utf8"; |
| 82 | case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": |
| 83 | return "utf16le"; |
| 84 | case "latin1": case "binary": return "latin1"; |
| 85 | case "base64": return "base64"; |
| 86 | case "base64url": return "base64url"; |
| 87 | case "hex": return "hex"; |
| 88 | case "ascii": return "ascii"; |
| 89 | default: return undefined; |
| 90 | } |
| 91 | }; |
| 92 | const once = (callback) => { |
| 93 | let called = false; |
| 94 | return function (...args) { |
no outgoing calls
no test coverage detected