Closed brownbl1 closed 7 years ago
i.e.
module.exports = function bufferActions(options, cb) {
var active = true
var queue = []
var passthrough = options && options.passthrough || []
var breaker = typeof options === 'object'
? options.breaker
: options
var breakerType = typeof breaker
//...
}
Kind of messy but it should work. That or we can just make a breaking change and release a new major version.
Yeah, I like that better too. I'll clean it up in the morning.
Changes made, and I also updated the readme to reflect the new argument definition. Feel free to tweak it. Tests still pass so I think we're good?
Awesome! Thanks. Also, I realized I forgot to bump the minor version in package.json. Could you do that and push a new package to npm when you get a chance?
I think this should address issue #14. I also added a very similar test to show what my changes would do.
Also, would this really constitute a breaking change if we only are adding an additional parameter? The first test passed without any modifications so in that sense it wouldn't effect current consumers.
Just let me know what you think!