def as_u32

emerging-ezjson@1.3.0.0 · src/value.bend:492

import emerging-ezjson@1.3.0.0/src/value.bend as Value
import Base

492# a number as a U32, or none when it is not one or does not fit
493def as_u32(val: Json) -> Maybe<&2, U32>:
494  match val:
495    case JNum{raw}:
496      U32.read(raw)
497    case other:
498      None{}

Uses (4)

Used by (1)