MCPcopy
hub / github.com/di-sukharev/opencommit / json

Function json

out/cli.cjs:6160–6169  ·  view source on GitHub ↗

* Decode response as json * * @return Promise

()

Source from the content-addressed store, hash-verified

6158 * @return Promise
6159 */
6160 json() {
6161 var _this2 = this;
6162 return consumeBody.call(this).then(function(buffer) {
6163 try {
6164 return JSON.parse(buffer.toString());
6165 } catch (err) {
6166 return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, "invalid-json"));
6167 }
6168 });
6169 },
6170 /**
6171 * Decode response as text
6172 *

Callers

nothing calls this directly

Calls 5

toBufferFunction · 0.85
specConsumeBodyFunction · 0.85
thenMethod · 0.80
parseMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…