def pick_j

cswap-bend-cli@0.1.0.0 · tui/read.bend:171

import cswap-bend-cli@0.1.0.0/tui/read.bend as Read
import Base
import cswap-bend-cli@0.1.0.0/json.bend as Json

171# The running daemon's own config (its status file) wins while it is alive;
172# a stopped daemon, or an older status file without one, reads settings.json.
173def pick_j(+live: Bool, +j: Json.Json) -> Json.Json:
174  match live:
175    case True{}:
176      j
177    case False{}:
178      Json.JNull{}

Uses (2)

Used by (1)