Json.emit.wrap: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/json.bend as Json Lines 242-248 of cswap-bend-cli@0.1.0.0/json.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/json.bend&start_line=242&end_line=248 import Base import cswap-bend-cli@0.1.0.0/json/quote.bend as Quote # A bracketed body: `[]` or `{}` when empty, else the body on its own lines. def emit.wrap(open: String, close: String, items: Json, inner: String, +style: U32, +d: Nat) -> String: match items: case JNil{}: open ++ close case _: open ++ Quote.nl(style, Nat.add(d, 1n)) ++ inner ++ Quote.nl(style, d) ++ close Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json/quote.bend&name=nl https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json.bend&name=Json