5.0.0 (2021-02-24)
Bug Fixes
- curry: Curried functions called without parameters would always return a function. (3b38f29)
const sum = curry((a, b) => a + b)
// prev: this worked because passing no explicit parameter did not increase
// the "internal count" or received parameters
sum()()()()()()
// now: works as intended
sum()()
// => NaN
- filter,forEach,min,max: Remove explicit binding to null when calling passed functions (f053967)
Features
- debounce: Remove .bind parameter. (cb55156)
- throttle: Remove .bind parameter. Rename "timeWindow" prop to "wait" - sync with "debounce" signature. (2af3b80)
- sort: Allow curried and uncurried versions (c532053)
- toggle: Allow curried and uncurried versions (419ab97)
- zipToObject: Allow curried and uncurried versions (b797080)
BREAKING CHANGES
// old
const thottledMouseMove = throttle(mouseMove, { timeWindow: 100, bind: this })
// new
const thottledMouseMove = throttle(mouseMove.bind(this), { wait: 100 })
// old
const handleAutocomplete = debounce(fn, { wait: 50, bind: this })
// new
const handleAutocomplete = debounce(fn.bind(this), { wait: 50 })