chore: extraction and centralization of utility functions

This commit is contained in:
2026-05-01 17:04:21 +02:00
parent a95e9482a7
commit 79ee67c2e0
15 changed files with 272 additions and 254 deletions

View File

@@ -22,8 +22,7 @@ defmodule BDS.MCP.Util do
def normalize_term(value), do: value |> to_string() |> String.downcase()
@spec maybe_put(map(), term(), term()) :: map()
def maybe_put(map, _key, nil), do: map
def maybe_put(map, key, value), do: Map.put(map, key, value)
def maybe_put(map, key, value), do: BDS.MapUtils.maybe_put(map, key, value)
@spec map_get(map(), atom(), term()) :: term()
def map_get(map, key, default \\ nil) do