Comparing version 4.4.2 to 4.5.0
@@ -16,4 +16,3 @@ "use strict"; | ||
var events = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new _dotEvent.default(); | ||
events.setName("store").setSyncOps("get").setOps("delete", "merge", "set", "time", "toggle"); | ||
events.withSyncOp("get").onAny(get); | ||
events.setName("store").setOps("delete", "merge", "set", "time", "toggle"); | ||
events.withOp("delete").onAny(del); | ||
@@ -24,21 +23,22 @@ events.withOp("merge").onAny(merge); | ||
events.withOp("toggle").onAny(toggle); | ||
events.get = get.bind({ | ||
events: events | ||
}); | ||
return events; | ||
} | ||
function get(_ref) { | ||
var event = _ref.event, | ||
store = _ref.store; | ||
var props = event.props; | ||
var state = store.state; | ||
function get(props) { | ||
var events = this.events; | ||
var state = events.state; | ||
if (props) { | ||
event.signal.returnValue = _dotPropImmutable.default.get(state, props); | ||
return _dotPropImmutable.default.get(state, props); | ||
} else { | ||
event.signal.returnValue = state; | ||
return state; | ||
} | ||
} | ||
function del(_ref2) { | ||
var event = _ref2.event, | ||
store = _ref2.store; | ||
function del(_ref) { | ||
var event = _ref.event, | ||
store = _ref.store; | ||
var props = event.props; | ||
@@ -49,5 +49,5 @@ var state = store.state; | ||
function merge(_ref3) { | ||
var event = _ref3.event, | ||
store = _ref3.store; | ||
function merge(_ref2) { | ||
var event = _ref2.event, | ||
store = _ref2.store; | ||
var args = event.args, | ||
@@ -59,5 +59,5 @@ props = event.props; | ||
function set(_ref4) { | ||
var event = _ref4.event, | ||
store = _ref4.store; | ||
function set(_ref3) { | ||
var event = _ref3.event, | ||
store = _ref3.store; | ||
var args = event.args, | ||
@@ -70,5 +70,5 @@ props = event.props; | ||
function time(_ref5) { | ||
var event = _ref5.event, | ||
store = _ref5.store; | ||
function time(_ref4) { | ||
var event = _ref4.event, | ||
store = _ref4.store; | ||
var props = event.props; | ||
@@ -79,5 +79,5 @@ var state = store.state; | ||
function toggle(_ref6) { | ||
var event = _ref6.event, | ||
store = _ref6.store; | ||
function toggle(_ref5) { | ||
var event = _ref5.event, | ||
store = _ref5.store; | ||
var props = event.props; | ||
@@ -84,0 +84,0 @@ var state = store.state; |
@@ -15,3 +15,3 @@ { | ||
], | ||
"version": "4.4.2", | ||
"version": "4.5.0", | ||
"description": "Immutable store extension for dot-event", | ||
@@ -32,3 +32,3 @@ "keywords": [ | ||
"@dot-store/dot-prop-immutable": "^3.1.0", | ||
"dot-event": "^1.1.0" | ||
"dot-event": "^1.1.2" | ||
}, | ||
@@ -35,0 +35,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11168
Updateddot-event@^1.1.2