@eknkc/dux
Advanced tools
Comparing version 3.0.7 to 3.0.8
@@ -156,7 +156,5 @@ 'use strict'; | ||
function scopeAction(scope, action) { | ||
return function () { | ||
var act = action.apply(undefined, arguments); | ||
act.meta = act.meta || {}; | ||
act.meta.scope = scope; | ||
return act; | ||
return function (payload) { | ||
var meta = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; | ||
return action(payload, Object.assign({}, meta, { scope: scope })); | ||
}; | ||
@@ -163,0 +161,0 @@ } |
@@ -112,8 +112,3 @@ import Immutable from 'seamless-immutable' | ||
export function scopeAction(scope, action) { | ||
return (...args) => { | ||
let act = action(...args); | ||
act.meta = act.meta || {}; | ||
act.meta.scope = scope; | ||
return act; | ||
} | ||
return (payload, meta = {}) => action(payload, Object.assign({}, meta, { scope })) | ||
} | ||
@@ -120,0 +115,0 @@ |
{ | ||
"name": "@eknkc/dux", | ||
"version": "3.0.7", | ||
"version": "3.0.8", | ||
"description": "Redux helpers", | ||
@@ -5,0 +5,0 @@ "main": "build.js", |
10517
242