Skip to content

Commit

Permalink
fix(cosmic-swingset): re-enable export of stringify
Browse files Browse the repository at this point in the history
dapp-svelte-wallet does a deep-import of repl.js, so it's really a part of
the cosmic-swingset external API surface. The function signature of
`stringify()` has changed, but that particular caller isn't affected.
  • Loading branch information
warner committed Mar 14, 2021
1 parent 4c538b1 commit 34b025c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/cosmic-swingset/lib/ag-solo/vats/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ import { Nat } from '@agoric/nat';
import makeUIAgentMakers from './ui-agent';

// A REPL-specific JSON stringify.
function stringify(value, spaces, inProgress = new WeakSet(), depth = 0) {
export function stringify(
value,
spaces,
inProgress = new WeakSet(),
depth = 0,
) {
if (Object(value) !== value) {
if (typeof value === 'bigint') {
return `${value}n`;
Expand Down

0 comments on commit 34b025c

Please sign in to comment.