def array_of

mlbend-huggingface@0.1.1.0 · main.bend:252

import mlbend-huggingface@0.1.1.0/main.bend as MlbendHuggingface
import Base
import bend-kit-json@0.6.1.1/json.bend as Json

252# A field of a JSON object, when it is there.
253def array_of(m: Maybe<&1, Json.Val>) -> Json.Val:
254  match m:
255    case Some{a}:
256      a
257    case None{}:
258      Json.Arr{Nil{}}

Uses (3)

Used by (1)