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

Function explode

out/cli.cjs:33290–33299  ·  view source on GitHub ↗
(key, value)

Source from the content-addressed store, hash-verified

33288 };
33289 exports2.encodeSimple = encodeSimple;
33290 function explode(key, value) {
33291 if (Array.isArray(value)) {
33292 return value.map((v5) => [key, v5]);
33293 } else if ((0, is_plain_object_js_1.isPlainObject)(value)) {
33294 const o3 = value !== null && value !== void 0 ? value : {};
33295 return Object.entries(o3).map(([k7, v5]) => [k7, v5]);
33296 } else {
33297 return [[key, value]];
33298 }
33299 }
33300 function serializeValue(value) {
33301 if (value === null) {
33302 return "null";

Callers 5

encodeMatrixFunction · 0.85
encodeLabelFunction · 0.85
formEncoderFunction · 0.85
encodeBodyFormFunction · 0.85
encodeSimpleFunction · 0.85

Calls 1

entriesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…