UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

15 lines • 619 B
/** Copy portable function definitions without parsing or executing them. */ export function functionSources(value = {}) { if (value === null || typeof value !== 'object' || Array.isArray(value)) { throw new TypeError('functions must map names to shell source strings'); } const result = Object.create(null); for (const [name, source] of Object.entries(value)) { if (typeof source !== 'string') { throw new TypeError('functions must map names to shell source strings'); } result[name] = source; } return result; } //# sourceMappingURL=functions.js.map