Closed voughtdq closed 5 years ago
When giving a negative value to take/[2,3] like this:
take/[2,3]
RecurringEvents.take(Date.utc_today(), %{by_day: :monday, freq: :weekly}, -1)
The function will consume resources until it crashes the VM.
The same goes for some invalid values, for example:
RecurringEvents.take(Date.utc_today(), %{by_day: :m, freq: :weekly}, 3)
It's probably best to raise an exception when bad values are provided.
Fixed in #18
When giving a negative value to
take/[2,3]
like this:The function will consume resources until it crashes the VM.
The same goes for some invalid values, for example:
It's probably best to raise an exception when bad values are provided.