forked from fishjam-dev/fishjam
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RTC-344] toggleable ll-hls (fishjam-dev#83)
* [RTC-344] toggleable ll-hls * Review fixes pt1 * Review fixes pt2 * lint * Review fixes pt3 * Add one more pid check to test * Monitor request handler in test
- Loading branch information
Showing
17 changed files
with
407 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
defmodule Jellyfish.Utils do | ||
@moduledoc false | ||
|
||
@doc "Convert all keys in map from snake_case to camelCase" | ||
@spec camel_case_keys(%{atom() => term()}) :: %{String.t() => term()} | ||
def camel_case_keys(map) do | ||
Map.new(map, fn {k, v} -> {snake_case_to_camel_case(k), v} end) | ||
end | ||
|
||
defp snake_case_to_camel_case(atom) do | ||
[first | rest] = "#{atom}" |> String.split("_") | ||
rest = rest |> Enum.map(&String.capitalize/1) | ||
Enum.join([first | rest]) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.