You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
chee 16829b2cba introduce mcflurry 5 years ago
README.md introduce mcflurry 5 years ago
index.js introduce mcflurry 5 years ago
package.json introduce mcflurry 5 years ago

README.md

mcflurry

destructuring an object in function arguments is fun and v flexible, but it means you can't build up the arguments over time using curry() and v sad.

so mcflurry lets you do this

const mcflurry = require('mcflurry')
const objectLog = mcflurry(console.log)
objectLog({a: 22})({b: 47})({c: 'dog', a: 1})() //=> {a:22, b:47, c:'dog'}

yes unfortunately it can't magically know when the function is fully satisfied, the only way to do that would be to supply a list of the keys that needed to be present separately as strings. that seemed more gross.

ruby has method(:lol).parameters which would allow you to do it there, but not in js in any way i could think of

so i've opted for calling it with no arguments when you're done

anyway thanks everybody bye