Created
January 10, 2013 20:30
-
-
Save danmactough/4505529 to your computer and use it in GitHub Desktop.
Simple function chaining function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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