Gizra / elm-debouncer

The most comprehensive debouncer for Elm
MIT License
13 stars 3 forks source link

Write helpers for common cases #6

Open rgrempel opened 7 years ago

rgrempel commented 7 years ago

The code in Debouncer.LowLevel basically attempts to be as comprehensive as possible, permitting the widest variety of strategies, inputs and outputs.

However, that makes some common cases more verbose to implement than they could be (see the module documentation for an example).

So, the plan is to write some combination of helper functions and additional modules which cater to common use cases. This would mean:

As my guide, I'll look at how I've actually used this on internal projects. I'll also look at the other debouncing packages for Elm. The idea would be that anyone moving from one of those to this package should be able to integrate just as simply, using some module that builds on top of Debouncer.LowLevel to provide some sugar.

rgrempel commented 6 years ago

This is now mostly implemented, in the division between Debouncer.Basic and Debouncer.Messages.

As an exercise sometime, I should try implementing the API for other debouncers on top of this one.