MCPcopy
hub / github.com/axios/axios / clear

Method clear

lib/core/AxiosHeaders.js:214–228  ·  view source on GitHub ↗
(matcher)

Source from the content-addressed store, hash-verified

212 }
213
214 clear(matcher) {
215 const keys = Object.keys(this);
216 let i = keys.length;
217 let deleted = false;
218
219 while (i--) {
220 const key = keys[i];
221 if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
222 delete this[key];
223 deleted = true;
224 }
225 }
226
227 return deleted;
228 }
229
230 normalize(format) {
231 const self = this;

Callers

nothing calls this directly

Calls 1

matchHeaderValueFunction · 0.85

Tested by

no test coverage detected