MCPcopy
hub / github.com/ajv-validator/ajv / normalizeId

Function normalizeId

lib/compile/resolve.ts:82–84  ·  view source on GitHub ↗
(id: string | undefined)

Source from the content-addressed store, hash-verified

80
81const TRAILING_SLASH_HASH = /#\/?$/
82export function normalizeId(id: string | undefined): string {
83 return id ? id.replace(TRAILING_SLASH_HASH, "") : ""
84}
85
86export function resolveUrl(resolver: UriResolver, baseId: string, id: string): string {
87 id = normalizeId(id)

Callers 11

addSchemaMethod · 0.90
removeSchemaMethod · 0.90
_addSchemaMethod · 0.90
getSchEnvFunction · 0.90
constructorMethod · 0.90
resolveSchemaFunction · 0.90
constructorMethod · 0.90
getFullPathFunction · 0.85
resolveUrlFunction · 0.85
getSchemaRefsFunction · 0.85
addRefFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…