Skip to content

Commit

Permalink
SQUASHME: marshal note
Browse files Browse the repository at this point in the history
  • Loading branch information
dckc committed Aug 23, 2023
1 parent d86509e commit 418ee39
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,15 @@ assert(wkBrand.Place);

const slots = []; // XXX global mutable state

// XXX should use @endo/marshal
const smallCaps = {
Nat: n => `+${n}`,
replacer: (k, v) =>
typeof v === 'bigint' ? `+${v}` : typeof v === 'symbol' ? `%${v}` : v,
typeof v === 'bigint'
? `+${v}`
: typeof v === 'symbol'
? `%${v.description}`
: v,
// XXX mutates obj
ref: obj => {
if (obj.ix) return obj.ix;
Expand Down

0 comments on commit 418ee39

Please sign in to comment.