• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

microlinkhq / html-get / 15132974951

20 May 2025 08:42AM UTC coverage: 98.792%. First build
15132974951

Pull #219

github

web-flow
Merge d84cf8758 into 3ae77cac2
Pull Request #219: chore: use null-prototype-object

140 of 147 branches covered (95.24%)

Branch coverage included in aggregate %.

2 of 2 new or added lines in 1 file covered. (100.0%)

596 of 598 relevant lines covered (99.67%)

25.14 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/util.js
1
'use strict'
15✔
2

15✔
3
const NullProtoObj = require('null-prototype-object')
15✔
4
const { parse } = require('content-type')
15✔
5

15✔
6
const CACHE = new NullProtoObj()
15✔
7

15✔
8
const parseContentType = contentType =>
15✔
9
  typeof contentType === 'string'
32✔
10
    ? parse(contentType)
32✔
11
    : { type: undefined, parameters: {} }
32✔
12

15✔
13
const contentType = headers => {
15✔
14
  const contentType = headers['content-type']
131✔
15
  return (
131✔
16
    CACHE[contentType] || (CACHE[contentType] = parseContentType(contentType))
131✔
17
  )
131✔
18
}
131✔
19

15✔
20
const getContentType = headers => contentType(headers).type
15✔
21

15✔
22
const getCharset = headers =>
15✔
23
  contentType(headers).parameters.charset?.toLowerCase()
77✔
24

15✔
25
const getContentLength = headers => Number(headers['content-length'])
15✔
26

15✔
27
module.exports = {
15✔
28
  getCharset,
15✔
29
  getContentLength,
15✔
30
  getContentType
15✔
31
}
15✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc