Skip to content

Commit 7c883c3

Browse files
Merge pull request #28 from davydog187/remove-guard
2 parents 627c5bf + 120303a commit 7c883c3

File tree

3 files changed

+1
-35
lines changed

3 files changed

+1
-35
lines changed

lib/posthog/event.ex

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ defmodule Posthog.Event do
8181
@type properties :: map()
8282
@type timestamp :: String.t() | DateTime.t() | NaiveDateTime.t()
8383

84-
import Posthog.Guard, only: [is_keyword_list: 1]
85-
8684
defstruct [:event, :distinct_id, :properties, :uuid, :timestamp]
8785

8886
@lib_name "posthog-elixir"
@@ -157,7 +155,7 @@ defmodule Posthog.Event do
157155
|> Enum.into(%{})
158156
end
159157

160-
defp deep_stringify_keys(term) when is_keyword_list(term) do
158+
defp deep_stringify_keys([{key, _value} | _] = term) when is_atom(key) do
161159
term
162160
|> Enum.map(fn {k, v} -> {to_string(k), deep_stringify_keys(v)} end)
163161
|> Enum.into(%{})

lib/posthog/guard.ex

Lines changed: 0 additions & 28 deletions
This file was deleted.

test/posthog/guard_test.exs

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)