MCPcopy Index your code
hub / github.com/simstudioai/sim / isUserFileWithMetadata

Function isUserFileWithMetadata

apps/sim/lib/core/utils/user-file.ts:35–43  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

33 * Checks if a value matches the full UserFile metadata shape.
34 */
35export function isUserFileWithMetadata(value: unknown): value is UserFile {
36 if (!isUserFile(value)) {
37 return false
38 }
39
40 const candidate = value as Record<string, unknown>
41
42 return typeof candidate.size === 'number' && typeof candidate.type === 'string'
43}
44
45/**
46 * Finds storage keys for UserFile objects embedded in a value.

Callers 11

hydrateValueFunction · 0.90
uploadFileFromRawDataFunction · 0.90
readUserFileContentFunction · 0.90
compactValueFunction · 0.90
extractFilesFromDataFunction · 0.90
formatValueFunction · 0.90
handleStreamedResponseFunction · 0.90
hydrateExplicitBase64Function · 0.90
collectUserFileKeysIntoFunction · 0.85

Calls 1

isUserFileFunction · 0.70

Tested by

no test coverage detected