7 ms·
Why not allow an optional 2nd argument that defaults to 1 on your `but` library to do this?
by dyscrete 12y ago
Why not allow an optional 2nd argument that defaults to 1 on your `but` library to do this?
- bevacqua 12y agoThat's what butt does! `but` doesn't do this because to be honest it's quite rare that you'll need it. and it's also butt-ugly to do that.
- aaronem 12y agoWhy complicate things? If it means so much to you, you can just var butt = require('butt'); var but = function(fun) { return butt(fun, 1); }; or even var but = function(fun) { return function(arg) { return fun(arg); }; };