mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-12-28 10:09:09 +00:00
13 lines
346 B
JavaScript
13 lines
346 B
JavaScript
'use strict';
|
|
|
|
module.exports = function (methodName) {
|
|
var initialArguments = [].slice.call(arguments, 1);
|
|
|
|
return function (item) {
|
|
if (typeof item[methodName] === 'function') {
|
|
var invokedArguments = [].slice.call(arguments, 1);
|
|
return item[methodName].apply(item, initialArguments.concat(invokedArguments));
|
|
}
|
|
};
|
|
};
|