Skip to content

Instantly share code, notes, and snippets.

View jcorbin's full-sized avatar

Joshua T Corbin jcorbin

View GitHub Profile
var isFunction = require('lodash.isFunction');
function oneAtATime(func) {
var running = false;
var queue = [];
function done() {
for (var i=0, n=queue.length; i<n; i++)
queue[i].apply(this, arguments);
running = true;