MCPcopy Create free account
hub / github.com/BridgeAR/safe-stable-stringify / b

Function b

test.js:1972–1972  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1970 const serializer = stringify.configure({ safe: true })
1971
1972 const obj = { b: 2, c: { a: true, get b () { throw new Error('Oops') } }, a: 1 }
1973 const expected = '{\n "a": 1,\n "b": 2,\n "c": "Error: Stringification failed (Oops)"\n}'
1974 const actual = serializer(obj, null, 1)
1975 assert.equal(actual, expected)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected