MCPcopy
hub / github.com/axios/axios / formatHeader

Function formatHeader

lib/core/AxiosHeaders.js:55–62  ·  view source on GitHub ↗
(header)

Source from the content-addressed store, hash-verified

53}
54
55function formatHeader(header) {
56 return header
57 .trim()
58 .toLowerCase()
59 .replace(/([a-z\d])(\w*)/g, (w, char, str) => {
60 return char.toUpperCase() + str;
61 });
62}
63
64function buildAccessors(obj, header) {
65 const accessorName = utils.toCamelCase(' ' + header);

Callers 1

normalizeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected