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

Function serializeValue

out/cli.cjs:33300–33313  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

33298 }
33299 }
33300 function serializeValue(value) {
33301 if (value === null) {
33302 return "null";
33303 } else if (typeof value === "undefined") {
33304 return "";
33305 } else if (value instanceof Date) {
33306 return value.toISOString();
33307 } else if (value instanceof Uint8Array) {
33308 return (0, base64_js_1.bytesToBase64)(value);
33309 } else if (typeof value === "object") {
33310 return JSON.stringify(value, jsonReplacer);
33311 }
33312 return `${value}`;
33313 }
33314 function jsonReplacer(_7, value) {
33315 if (value instanceof Uint8Array) {
33316 return (0, base64_js_1.bytesToBase64)(value);

Callers 2

encodeValueFunction · 0.85
encodeDeepObjectObjectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…