def has_json

cswap-bend-cli@0.1.0.0 · exec.bend:238

import cswap-bend-cli@0.1.0.0/exec.bend as Exec
import Base
import cswap-bend-cli@0.1.0.0/fmt/out.bend as O

238# `--json` for the verbs that print a JSON document of their own; every other
239# command's text is wrapped by O.convert.
240def has_json(+v0: String, +v1: String) -> Bool:
241  String.eq(v0, "list") || String.eq(v0, "status") || String.eq(v0, "switch") || String.eq(v0, "profile")
242    || (String.eq(v0, "config") && (String.is_empty(v1) || String.eq(v1, "list") || String.eq(v1, "get") || String.eq(v1, "export") || String.eq(v1, "import")))

Uses (6)

Used by (1)