MCPcopy Create free account
hub / github.com/BloombergGraphics/whatiscode / normalizeName

Function normalizeName

scripts/libs/fetch.js:8–16  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

6 }
7
8 function normalizeName(name) {
9 if (typeof name !== 'string') {
10 name = name.toString();
11 }
12 if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) {
13 throw new TypeError('Invalid character in header field name')
14 }
15 return name.toLowerCase()
16 }
17
18 function normalizeValue(value) {
19 if (typeof value !== 'string') {

Callers 1

fetch.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected