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

Function headersGetter

lib/test/angular/1.4.3/angular.js:9303–9319  ·  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

9301 * - if called with no arguments returns an object containing all headers.
9302 */
9303function headersGetter(headers) {
9304 var headersObj;
9305
9306 return function(name) {
9307 if (!headersObj) headersObj = parseHeaders(headers);
9308
9309 if (name) {
9310 var value = headersObj[lowercase(name)];
9311 if (value === void 0) {
9312 value = null;
9313 }
9314 return value;
9315 }
9316
9317 return headersObj;
9318 };
9319}
9320
9321
9322/**

Callers 2

serverRequestFunction · 0.70
resolvePromiseFunction · 0.70

Calls 2

parseHeadersFunction · 0.70
lowercaseFunction · 0.70

Tested by

no test coverage detected