MCPcopy
hub / github.com/xintaofei/codeg / asObject

Function asObject

src/lib/app-error.ts:6–10  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

4type ObjectLike = Record<string, unknown>
5
6function asObject(value: unknown): ObjectLike | null {
7 return value !== null && typeof value === "object"
8 ? (value as ObjectLike)
9 : null
10}
11
12function normalizeString(value: unknown): string | null {
13 return typeof value === "string" && value.trim() ? value.trim() : null

Callers 3

parseI18nParamsFunction · 0.70
parseErrorObjectFunction · 0.70
extractAppCommandErrorFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected