MCPcopy Create free account
hub / github.com/Snowflyt/tinyeffect / parseContent

Function parseContent

test/README.example.proof.ts:1006–1013  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

1004 const readFile = effect("readFile")<[path: string], string>;
1005 const parseError = error("parse");
1006 const parseContent = (content: string) =>
1007 effected(function* () {
1008 try {
1009 return JSON.parse(content);
1010 } catch (e) {
1011 return yield* parseError((e as any).message);
1012 }
1013 });
1014
1015 const processFile1 = (path: string) =>
1016 effected(function* () {

Callers 4

processFileGenFunction · 0.85
processFilePipeFunction · 0.85
processFile1Function · 0.85
processFile2Function · 0.85

Calls 1

effectedFunction · 0.90

Tested by 2

processFileGenFunction · 0.68
processFilePipeFunction · 0.68