4 ms·
There's also `butt` if you have more complicated needs. Feel free to use it. https://github.com/bevacqua/butt https://github.com/bevacqua/butt
by bevacqua 12y ago
There's also `butt` if you have more complicated needs. Feel free to use it.
https://github.com/bevacqua/butt https://github.com/bevacqua/butt
- dyscrete 12y agoWhy 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); }; };