diff --git a/src/actions.todo b/src/actions.todo deleted file mode 100644 index 51ad508..0000000 --- a/src/actions.todo +++ /dev/null @@ -1,26 +0,0 @@ -export function isActionGen(action) { - return typeof action === 'function' && action.type; -} - -export function action(type, payloadFunction, transformer) { - let generator = function (...payloadArg) { - const result = { type }; - - if (payloadFunction) { - result.payload = payloadFunction(...payloadArg); - } else { - if (payloadArg[0] !== undefined) result.payload = payloadArg[0]; - } - - return result; - }; - - if (transformer) { - const orig = generator; - generator = (...args) => transformer(orig(...args), args); - } - - generator.type = type; - - return generator; -}