(str)
| 32 | * @returns {string} UTF-8 bytes as a Latin-1 string |
| 33 | */ |
| 34 | const encodeUTF8 = (str) => |
| 35 | encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => |
| 36 | String.fromCharCode(parseInt(hex, 16)) |
| 37 | ); |
| 38 | |
| 39 | function resolveConfig(config) { |
| 40 | const newConfig = mergeConfig({}, config); |