MCPcopy Create free account
hub / github.com/PrairieLearn/PrairieLearn / tryParse

Function tryParse

public/javascripts/socket.io.js:1362–1369  ·  view source on GitHub ↗
(p, str)

Source from the content-addressed store, hash-verified

1360 }
1361
1362 function tryParse(p, str) {
1363 try {
1364 p.data = json.parse(str);
1365 } catch(e){
1366 return error();
1367 }
1368 return p;
1369 };
1370
1371 /**
1372 * Deallocates a parser's resources

Callers 1

decodeStringFunction · 0.85

Calls 1

errorFunction · 0.70

Tested by

no test coverage detected