MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / chain

Function chain

assets/js/physics-matter.js:4749–4767  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4747 }
4748
4749 var chain = function() {
4750 // https://github.com/GoogleChrome/devtools-docs/issues/53#issuecomment-51941358
4751 var lastResult,
4752 args = new Array(arguments.length);
4753
4754 for (var i = 0, l = arguments.length; i < l; i++) {
4755 args[i] = arguments[i];
4756 }
4757
4758 for (i = 0; i < funcs.length; i += 1) {
4759 var result = funcs[i].apply(lastResult, args);
4760
4761 if (typeof result !== 'undefined') {
4762 lastResult = result;
4763 }
4764 }
4765
4766 return lastResult;
4767 };
4768
4769 chain._chained = funcs;
4770

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected