MCPcopy Index your code
hub / github.com/triggerdotdev/trigger.dev / stringifyIO

Function stringifyIO

packages/core/src/v3/utils/ioSerialization.ts:36–53  ·  view source on GitHub ↗
(value: any)

Source from the content-addressed store, hash-verified

34}
35
36export async function stringifyIO(value: any): Promise<IOPacket> {
37 if (value === undefined) {
38 return { dataType: "application/json" };
39 }
40
41 if (typeof value === "string") {
42 return { data: value, dataType: "text/plain" };
43 }
44
45 try {
46 const { stringify } = await loadSuperJSON();
47 const data = stringify(value);
48
49 return { data, dataType: "application/super+json" };
50 } catch {
51 return { data: value, dataType: "application/json" };
52 }
53}
54
55export async function conditionallyExportPacket(
56 packet: IOPacket,

Callers 4

executeMethod · 0.90
createTaskFunction · 0.90
callMethod · 0.90
callMethod · 0.90

Calls 1

loadSuperJSONFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…