MCPcopy Create free account
hub / github.com/chavyleung/scripts / getjson

Method getjson

Env.js:124–133  ·  view source on GitHub ↗
(key, defaultValue)

Source from the content-addressed store, hash-verified

122 }
123
124 getjson(key, defaultValue) {
125 let json = defaultValue
126 const val = this.getdata(key)
127 if (val) {
128 try {
129 json = JSON.parse(this.getdata(key))
130 } catch {}
131 }
132 return json
133 }
134
135 setjson(val, key) {
136 try {

Callers

nothing calls this directly

Calls 1

getdataMethod · 0.45

Tested by

no test coverage detected