Comparing version 0.4.0 to 0.4.1
@@ -40,8 +40,4 @@ "use strict"; | ||
value: function composer() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, | ||
_ref$events = _ref.events, | ||
events = _ref$events === void 0 ? new Events() : _ref$events, | ||
state = _ref.state; | ||
return events.setState(state); | ||
var events = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Events(); | ||
return events; | ||
} | ||
@@ -51,5 +47,6 @@ }]); | ||
function Events() { | ||
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
(0, _classCallCheck2.default)(this, Events); | ||
this.name = "events"; | ||
this.state = {}; | ||
this.state = options.state || {}; | ||
this.ops = new Set(); | ||
@@ -56,0 +53,0 @@ this.opsSync = new Set(); |
@@ -18,9 +18,9 @@ // Helpers | ||
export default class Events { | ||
static composer({ events = new Events(), state } = {}) { | ||
return events.setState(state) | ||
static composer(events = new Events()) { | ||
return events | ||
} | ||
constructor() { | ||
constructor(options = {}) { | ||
this.name = "events" | ||
this.state = {} | ||
this.state = options.state || {} | ||
@@ -27,0 +27,0 @@ this.ops = new Set() |
@@ -15,3 +15,3 @@ { | ||
], | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "Build beautiful and extensible eventing APIs", | ||
@@ -18,0 +18,0 @@ "keywords": [ |
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
105794
1889