Norm.with_reset.at: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/usage/norm.bend as Norm Lines 47-55 of cswap-bend-cli@0.1.0.0/usage/norm.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/usage/norm.bend&start_line=47&end_line=55 import Base import cswap-bend-cli@0.1.0.0/json.bend as Json # resets_at, then countdown and clock when the stamp parses. def with_reset.at(j: Json.Json, s: String, t: Maybe<&2, U32>, +now: U32, +off: U32) -> Json.Json: match t: case None{}: Json.set("resets_at", Json.JStr{s}, j) case Some{+u}: Json.set("clock", Json.JStr{clock.text(u, now, off)}, Json.set("countdown", Json.JStr{countdown(remaining(u, now))}, Json.set("resets_at", Json.JStr{s}, j))) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String 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.bend&name=Json https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json.bend&name=set https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/usage/norm.bend&name=clock.text https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/usage/norm.bend&name=countdown https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/usage/norm.bend&name=remaining