Skip to content

Instantly share code, notes, and snippets.

@danmactough
Created January 10, 2013 20:30
Show Gist options
  • Save danmactough/4505529 to your computer and use it in GitHub Desktop.
Save danmactough/4505529 to your computer and use it in GitHub Desktop.
Simple function chaining function
var chain = module.exports = function(x, fns){
for (var i=0, l=fns.length; i < l; i++){
x = fns[i](x);
}
return x;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment