This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
outline/frontend/utils/actions.js
Tom Moor 2095b3a874 Fix prettier integration, format (#31)
* Fix prettier integration, format

* Reformat again
2017-04-27 21:48:13 -07:00

10 lines
217 B
JavaScript

export default (type, ...argNames) => {
return function(...args) {
const action = { type };
argNames.forEach((arg, index) => {
action[argNames[index]] = args[index];
});
return action;
};
};