FusionDSL v0.0.1-dev FusionDsl.Helpers.FunctionNames View Source
This modules helps normalizing function names of packages so that they wont interfere with elixir or fusionDsl reserved keyworks.
Link to this section Summary
Functions
Normalizes a word as atom or binary
Sorts function names (list of atoms e.g: [:f1, :fn2, :fun3]
)
from longest to shortest (like: [:fun3, :fn2, :f1]
)
Link to this section Functions
Normalizes a word as atom or binary.
If the world is in elixir reserved keywords it will return a new name
with an fn_
prefix.
If the world is in FusionDSL reserced keywords it will raise an exception!
Examples
iex> FusionDsl.Helpers.FunctionNames.normalize!(:test)
:test
iex> FusionDsl.Helpers.FunctionNames.normalize!("test")
"test"
Sorts function names (list of atoms e.g: [:f1, :fn2, :fun3]
)
from longest to shortest (like: [:fun3, :fn2, :f1]
)