MCPcopy Create free account
hub / github.com/aosabook/500lines / jsonToScript

Function jsonToScript

blockcode/code/file.js:21–27  ·  view source on GitHub ↗
(json)

Source from the content-addressed store, hash-verified

19 }
20
21 function jsonToScript(json){
22 clearScript();
23 JSON.parse(json).forEach(function(block){
24 scriptElem.appendChild(Block.create.apply(null, block));
25 });
26 Menu.runSoon();
27 }
28
29 function restoreLocal(){ jsonToScript(localStorage[title] || '[]' ); }
30

Callers 2

restoreLocalFunction · 0.85
readFileFunction · 0.85

Calls 1

clearScriptFunction · 0.85

Tested by

no test coverage detected