@tanstack/ai-mcp
Version:
Host-side Model Context Protocol client for TanStack AI: discover and run MCP server tools, resources, and prompts in any adapter's chat() loop, with generated end-to-end types.
21 lines (20 loc) • 654 B
JavaScript
//#region src/events/value.ts
function isRecord(value) {
return typeof value === "object" && value !== null && !Array.isArray(value);
}
/** For values from `JSON.parse` or a JSON-RPC result, which hold only JSON. */
function isJsonObject(value) {
return isRecord(value);
}
function isNonEmptyString(value) {
return typeof value === "string" && value.length > 0;
}
function isSafeInteger(value) {
return typeof value === "number" && Number.isSafeInteger(value);
}
function issues(message) {
return { issues: [{ message }] };
}
//#endregion
export { isJsonObject, isNonEmptyString, isRecord, isSafeInteger, issues };
//# sourceMappingURL=value.js.map