Releases: asd-xiv/m
Releases · asd-xiv/m
v6.1.0
v6.0.0
6.0.0 (2021-04-27)
Features
BREAKING CHANGES
distinct
no longer uses deep equal compare. UsedistinctBy
with custom
compare function to parse object arrays.
// old
distinct([1, {a: 2}, {a: 2}])
// => [1, {a: 2}]
// new
import deepEquals from "fast-deep-equal"
distinctBy(deepEquals, [1, { a: 2 }, { a: 2 }])
// => [1, {a: 2}]
-
feat: Add
overlap
andoverlapBy
functions to combine 2 arrays into a set (array of unique items) -
feat: Add
intersect
andintersectBy
functions to obtain common items in 2 arrays -
feat: rename "join" -> "unit", "overlap" -> "join"
-
Functions renamed:
- "join" -> "unit"
- "overlap" -> "join"
- chore: fix linting errors
v5.4.0
v5.3.0
v5.2.0
v5.1.0
v5.0.0
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
- throttle:
// old
const thottledMouseMove = throttle(mouseMove, { timeWindow: 100, bind: this })
// new
const thottledMouseMove = throttle(mouseMove.bind(this), { wait: 100 })
- debounce:
// old
const handleAutocomplete = debounce(fn, { wait: 50, bind: this })
// new
const handleAutocomplete = debounce(fn.bind(this), { wait: 50 })