Norm.window.pct: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/usage/norm.bend as Norm Lines 71-78 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=71&end_line=78 import Base import cswap-bend-cli@0.1.0.0/json.bend as Json # five_hour / seven_day: {pct, resets_at, countdown, clock}. A window with no # utilization is left out. def window.pct(u: Maybe<&2, Json.Json>, r: Maybe<&2, String>, +now: U32, +off: U32) -> Maybe<&2, Json.Json>: match u: case None{}: None{} case Some{p}: Some{with_reset(Json.of_pairs([("pct", p)]), r, now, off)} Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma 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=of_pairs https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/usage/norm.bend&name=with_reset