MCPcopy
hub / github.com/compiler-explorer/compiler-explorer / encode_object

Function encode_object

shared/rison.ts:195–200  ·  view source on GitHub ↗
(v: JSONValue)

Source from the content-addressed store, hash-verified

193 *
194 */
195export function encode_object(v: JSONValue) {
196 if (typeof v != 'object' || v === null || Array.isArray(v))
197 throw new Error('rison.encode_object expects an object argument');
198 const r = unwrap(encode_table[typeof v](v));
199 return r.substring(1, r.length - 1);
200}
201
202/**
203 * rison-encode a javascript array without surrounding parens

Callers

nothing calls this directly

Calls 1

unwrapFunction · 0.70

Tested by

no test coverage detected