mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-12-30 18:59:10 +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));
|
|
}
|
|
};
|
|
};
|