soldair / node-when-connected

reconnection retry and stream continuation for multilevel
1 stars 0 forks source link

curry the recon object #1

Open juliangruber opened 11 years ago

juliangruber commented 11 years ago

What about currying the recon object and adding whenConntected.stream instead of an options object:

var whenConnected = require('when-connected')(recon);
var get = whenConnected(function () { /* ... */ });
var dumpDB = whenConnected.stream(function () { /* ... */ });
soldair commented 11 years ago

that makes the default use case much easier. thanks for the idea! ill try it out now,