-module(plunk@internal@utils). -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). -export([omit_if_none/4]). -spec omit_if_none( list({binary(), gleam@json:json()}), binary(), gleam@option:option(IDI), fun((IDI) -> gleam@json:json()) ) -> list({binary(), gleam@json:json()}). omit_if_none(Fields, Key, Optional_value, Target) -> case Optional_value of {some, Value} -> [{Key, Target(Value)} | Fields]; none -> Fields end.