MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / safeRenderJSON

Function safeRenderJSON

lib/web/output.js:7–25  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

5}
6
7function safeRenderJSON(text)
8{
9 try{
10 console.log(" about to safe render json for text :")
11 text = text.substring("<json>".length)
12 console.log(text)
13 var tt = eval("renderjson.set_show_to_level(1)("+text+")")
14
15 console.log(" safe render succeeded with :")
16 console.log(tt)
17 return tt
18 }
19 catch(e)
20 {
21 console.log(" safe render failed ")
22 console.log(e)
23 return text.length>1000 ? text.substring(0, 1000)+" ... " : text
24 }
25}
26
27if (!String.prototype.startsWith) {
28 String.prototype.startsWith = function(searchString, position){

Callers 1

appendRemoteOutputToLineFunction · 0.85

Calls 1

logMethod · 0.80

Tested by

no test coverage detected