(path: string)
| 77 | } |
| 78 | |
| 79 | function basename(path: string): string { |
| 80 | const normalized = path.replaceAll('\\', '/') |
| 81 | const slashIndex = normalized.lastIndexOf('/') |
| 82 | const name |
| 83 | = slashIndex === -1 ? normalized : normalized.slice(slashIndex + 1) |
| 84 | return name.replace(/\.(?:json|ya?ml)$/i, '') |
| 85 | } |
| 86 | |
| 87 | function resolveRef(root: UnknownRecord, value: unknown): unknown { |
| 88 | if (!isRecord(value) || typeof value.$ref !== 'string') |
no outgoing calls
no test coverage detected