logo

news_parse_ex

maps.ex (342B)


  1. # NewsParseEx: RSS/Atom parser
  2. # Copyright © 2023 Haelwenn (lanodan) Monnier <contact+news_parse_ex@hacktivis.me>
  3. # SPDX-License-Identifier: AGPL-3.0-only
  4. defmodule NewsParseEx.Maps do
  5. def put_if_ok(map, key, {:ok, value}) when is_map(map) and key != nil do
  6. Map.put(map, key, value)
  7. end
  8. def put_if_ok(map, _key, _n), do: map
  9. end