Library to manage ranges of arbitrary type.
Range.adjacent?(Range.new!(1, 100), Range.new!(100, 200))
# => true
Range.contains?(Range.new!(1, 100), Range.new!(20, 30))
# => true
Range.overlap?(Range.new!(1, 100), Range.new!(200, 300))
# => false
# And many more, check the docs :)
Warder.Range
and Warder.Multirange
are Parameterized ecto
Types.
The package can be installed by adding warder
to your list of dependencies in
mix.exs
:
def deps do
[
{:warder, "~> 0.1.0"}
]
end
The docs can be found at https://hexdocs.pm/warder.