MCPcopy Index your code
hub / github.com/tinyhttp/tinyhttp / tryNormalizeType

Function tryNormalizeType

packages/type-is/src/index.ts:12–20  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

10}
11
12function tryNormalizeType(value: string) {
13 if (!value) return null
14
15 try {
16 return normalizeType(value)
17 } catch (err) {
18 return null
19 }
20}
21
22function mimeMatch(expected: string | boolean, actual: string | boolean) {
23 // invalid type

Callers 1

typeIsFunction · 0.85

Calls 1

normalizeTypeFunction · 0.70

Tested by

no test coverage detected