Skip to content

curryDestructed

Latest
Compare
Choose a tag to compare
@richie-south richie-south released this 12 Jul 20:20
· 8 commits to master since this release

changelog

breaking

--

non breaking

  • curryObject fn is now curried for other params as well
  • implemented curryDestructed
    example
// add must have simple destruction! : no rest ... or nested destructions
const add = ({ a, b, c}) => a + b + c

const addC = curryObject(add)
addC({a: 1, b: 1, c: 1})     // >> 3
addC({a: 1})({b: 1})({c: 1}) // >> 3
addC({c: 1})({b: 1, a: 1})   // >> 3