MCPcopy
hub / github.com/axios/axios / accessor

Method accessor

lib/core/AxiosHeaders.js:303–326  ·  lib/core/AxiosHeaders.js::AxiosHeaders.accessor
(header)

Source from the content-addressed store, hash-verified

301 }
302
303 static accessor(header) {
304 const internals =
305 (this[$internals] =
306 this[$internals] =
307 {
308 accessors: {},
309 });
310
311 const accessors = internals.accessors;
312 const prototype = this.prototype;
313
314 function defineAccessor(_header) {
315 const lHeader = normalizeHeader(_header);
316
317 if (!accessors[lHeader]) {
318 buildAccessors(prototype, _header);
319 accessors[lHeader] = true;
320 }
321 }
322
323 utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
324
325 return this;
326 }
327}
328
329AxiosHeaders.accessor([

Callers 3

AxiosHeaders.jsFile · 0.80

Calls 1

forEachMethod · 0.80

Tested by

no test coverage detected