def cookie.max_age.cap
import bend-kit-http@0.38.2.0/http.bend as Httpimport Base
2186# More than 9 significant digits is past the limit (and would overflow parse_u32).
2187def cookie.max_age.cap(long: Bool, m: Maybe<&2, U32>) -> Maybe<&2, U32>:
2188 match m:
2189 case None{}:
2190 None{}
2191 case Some{s}:
2192 Some{Bool.pick(U32, long, cookie.limit(), s)}