Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Flow control? Why not zoidberg
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.gitignore
README.md
collection.js
index.js
package.json
whynotzoidberg.js
zoidberg.js

README.md

Flow control? Why not zoidberg?

Module status: Work in progress

First of all, fuck yea, this module name wasn't taken, (\/)(;,,;)(\/) whoop whoop whoop.

What zoidberg makes special is that is everything is run inside a domain. This ensures that the callback is ALWAYS called even when the iterators throw a function. No more worries, fucking awesome yo.

Also, a flow control library is something you should have build once in your Node.js career.

API

var zoidberg = require('zoidberg');

// iterate over an array
zoidberg.forEach(arrayish, function forEach(item, callback) {
  callback(new Error('Foo Bar'));
}, function done(err) {
  // Error...
});

function done(err) {
  console.log(err.message); // Operation timed out
}

// if the callback is not fired in x then it will return with an error
done.timeout = 987429;

// iterate over an array with timeout
zoidberg.forEach(arrayish, function forEach(item, callback) {
  callback(new Error('Foo Bar'));
}, done);

LICENSE

MIT

Something went wrong with that request. Please try again.