Wobserver v0.1.8 Wobserver.Util.Helper View Source
Helper functions and JSON encoders.
Link to this section Summary
Link to this section Functions
Link to this function
format_function(name)
View Source
format_function(nil | {atom, atom, integer} | atom) :: String.t | nil
Formats function information as readable string.
Only name will be return if only name
is given.
Example:
iex> format_function {Logger, :log, 2}
"Logger.log/2"
iex> format_function :format_function
"format_function"
iex> format_function nil
nil
Link to this function
parallel_map(enum, function)
View Source
parallel_map(enum :: list, function :: (... -> any)) :: list
Parallel map implemented with Task
.
Maps the function
over the enum
using Task.async/1
and Task.await/1
.
Link to this function
string_to_module(module)
View Source
string_to_module(module :: String.t) :: atom
Converts Strings to module names or atoms.
The given module
string will be turned into atoms that get concatted.