Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/aosabook/500lines
/ scriptToJson
Function
scriptToJson
blockcode/code/file.js:16–19 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
14
}
15
16
function
scriptToJson(){
17
var
blocks = [].slice.call(document.querySelectorAll(
'.script > .block'
));
18
return
blocks.length ? JSON.stringify(blocks.map(Block.script)) : null;
19
}
20
21
function
jsonToScript(json){
22
clearScript();
Callers
2
saveLocal
Function · 0.85
saveFile
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected