(headers)
| 1 | function getContentType(headers) { |
| 2 | if(!headers) { |
| 3 | return; |
| 4 | } |
| 5 | |
| 6 | for(let key in headers) { |
| 7 | if(key.toLowerCase() === "content-type") { |
| 8 | return headers[key]; |
| 9 | } |
| 10 | } |
| 11 | } |
| 12 | |
| 13 | // Inspired by `resp-modifier` https://github.com/shakyShane/resp-modifier/blob/4a000203c9db630bcfc3b6bb8ea2abc090ae0139/index.js |
| 14 | function wrapResponse(resp, transformHtml) { |
no outgoing calls
no test coverage detected
searching dependent graphs…