MCPcopy Index your code
hub / github.com/angular-ui/ui-grid / headersGetter

Function headersGetter

lib/test/angular/1.6.7/angular.js:11441–11457  ·  view source on GitHub ↗

* Returns a function that provides access to parsed headers. * * Headers are lazy parsed when first requested. * @see parseHeaders * * @param {(string|Object)} headers Headers to provide access to. * @returns {function(string=)} Returns a getter function which if called with: * * - if call

(headers)

Source from the content-addressed store, hash-verified

11439 * - if called with no arguments returns an object containing all headers.
11440 */
11441function headersGetter(headers) {
11442 var headersObj;
11443
11444 return function(name) {
11445 if (!headersObj) headersObj = parseHeaders(headers);
11446
11447 if (name) {
11448 var value = headersObj[lowercase(name)];
11449 if (value === undefined) {
11450 value = null;
11451 }
11452 return value;
11453 }
11454
11455 return headersObj;
11456 };
11457}
11458
11459
11460/**

Callers 2

serverRequestFunction · 0.70
resolvePromiseFunction · 0.70

Calls 2

parseHeadersFunction · 0.70
lowercaseFunction · 0.70

Tested by

no test coverage detected