MCPcopy Index your code
hub / github.com/Xyntopia/taskyon / bigIntToString

Function bigIntToString

src/modules/chat.ts:467–491  ·  view source on GitHub ↗
(obj: unknown)

Source from the content-addressed store, hash-verified

465}
466
467export function bigIntToString(obj: unknown): unknown {
468 if (obj === null) {
469 return obj;
470 }
471
472 if (typeof obj === 'bigint') {
473 return obj.toString();
474 }
475
476 if (Array.isArray(obj)) {
477 return obj.map((item) => bigIntToString(item));
478 }
479
480 if (typeof obj === 'object') {
481 const result: { [key: string]: unknown } = {};
482 for (const key in obj) {
483 if (Object.prototype.hasOwnProperty.call(obj, key)) {
484 result[key] = bigIntToString((obj as Record<string, unknown>)[key]);
485 }
486 }
487 return result;
488 }
489
490 return obj;
491}
492
493function mapFunctionNames(toolNames: string[]) {
494 return toolNames?.map((t) => tools[t]);

Callers 1

handleFunctionExecutionFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected