MCPcopy
hub / github.com/axios/axios / encodeUTF8

Function encodeUTF8

lib/helpers/resolveConfig.js:34–37  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

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

Callers 1

resolveConfigFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected