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

Function normalizeType

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

Source from the content-addressed store, hash-verified

2import * as typer from 'es-content-type'
3
4function normalizeType(value: string) {
5 // parse the type
6 const type = typer.parse(value)
7 type.parameters = {}
8 // reformat it
9 return typer.format(type)
10}
11
12function tryNormalizeType(value: string) {
13 if (!value) return null

Callers 1

tryNormalizeTypeFunction · 0.70

Calls 1

formatMethod · 0.80

Tested by

no test coverage detected