Comparing version 2.10.0 to 2.11.0
@@ -18,2 +18,6 @@ "use strict"; | ||
// Helpers | ||
// Constants | ||
var propDefault = []; // Helpers | ||
function buildPayload(_ref) { | ||
@@ -43,2 +47,3 @@ var emit = _ref.emit, | ||
var emitArgs = emitEvent ? emitEvent.args : undefined; | ||
var emitProps = emitEvent && emitEvent.props ? emitEvent.props : propDefault; | ||
var newOptions = buildOptions({ | ||
@@ -57,5 +62,6 @@ emitArgs: emitArgs, | ||
options: newOptions && Object.keys(newOptions).length ? newOptions : undefined, | ||
props: emitEvent && emitEvent.props ? emitEvent.props.length ? emitEvent.props : undefined : undefined, | ||
props: emitProps, | ||
signal: emitEvent ? emitEvent.signal : undefined | ||
} | ||
}, | ||
props: emitProps | ||
}, events.name, events)); | ||
@@ -62,0 +68,0 @@ } |
@@ -0,4 +1,9 @@ | ||
// Helpers | ||
import { propVar } from "./props" | ||
import { isObject } from "./util" | ||
// Constants | ||
const propDefault = [] | ||
// Helpers | ||
export function buildPayload({ emit, opts = {}, state }) { | ||
@@ -22,2 +27,6 @@ const { args, events, op, options, props } = state | ||
const emitArgs = emitEvent ? emitEvent.args : undefined | ||
const emitProps = | ||
emitEvent && emitEvent.props | ||
? emitEvent.props | ||
: propDefault | ||
@@ -44,10 +53,6 @@ const newOptions = buildOptions({ | ||
: undefined, | ||
props: | ||
emitEvent && emitEvent.props | ||
? emitEvent.props.length | ||
? emitEvent.props | ||
: undefined | ||
: undefined, | ||
props: emitProps, | ||
signal: emitEvent ? emitEvent.signal : undefined, | ||
}, | ||
props: emitProps, | ||
[events.name]: events, | ||
@@ -54,0 +59,0 @@ } |
{ | ||
"name": "dot-event", | ||
"version": "2.10.0", | ||
"version": "2.11.0", | ||
"description": "Powerful event emitter", | ||
@@ -14,6 +14,6 @@ "keywords": [ | ||
"type": "git", | ||
"url": "git+ssh://git@github.com/dot-event/core.git" | ||
"url": "git+ssh://git@github.com/dot-event/dot-event.git" | ||
}, | ||
"license": "MIT", | ||
"homepage": "https://github.com/dot-event/core#readme", | ||
"homepage": "https://github.com/dot-event/dot-event#readme", | ||
"operations": { | ||
@@ -20,0 +20,0 @@ "git": {}, |
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
117612
2164