MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / encodeJSON

Function encodeJSON

out/cli.cjs:33250–33259  ·  view source on GitHub ↗
(key, value, options)

Source from the content-addressed store, hash-verified

33248 return out.slice(1);
33249 }
33250 function encodeJSON(key, value, options) {
33251 if (typeof value === "undefined") {
33252 return "";
33253 }
33254 const encodeString = (v5) => {
33255 return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v5) : v5;
33256 };
33257 const encVal = encodeString(JSON.stringify(value, jsonReplacer));
33258 return (options === null || options === void 0 ? void 0 : options.explode) ? encVal : `${encodeString(key)}=${encVal}`;
33259 }
33260 var encodeSimple = (key, value, options) => {
33261 let out = "";
33262 const pairs = (options === null || options === void 0 ? void 0 : options.explode) ? explode(key, value) : [[key, value]];

Callers

nothing calls this directly

Calls 1

encodeStringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…