Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dot-event

Package Overview
Dependencies
Maintainers
1
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dot-event - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

11

dist/core.js

@@ -11,2 +11,4 @@ "use strict";

var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread"));
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));

@@ -35,2 +37,4 @@

var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
_ref$defaultOptions = _ref.defaultOptions,
defaultOptions = _ref$defaultOptions === void 0 ? {} : _ref$defaultOptions,
_ref$name = _ref.name,

@@ -40,2 +44,3 @@ name = _ref$name === void 0 ? "events" : _ref$name;

(0, _classCallCheck2.default)(this, Events);
this.defaultOptions = defaultOptions;
this.name = name;

@@ -82,2 +87,8 @@ this.ops = new Set();

(0, _createClass2.default)(Events, [{
key: "setDefaultOptions",
value: function setDefaultOptions(options) {
this.defaultOptions = (0, _objectSpread2.default)({}, this.defaultOptions, options);
return this;
}
}, {
key: "setOp",

@@ -84,0 +95,0 @@ value: function setOp(op) {

4

dist/payload.js

@@ -45,2 +45,3 @@ "use strict";

emitEvent: emitEvent,
events: events,
options: options,

@@ -66,2 +67,3 @@ props: props

emitEvent = _ref2.emitEvent,
events = _ref2.events,
options = _ref2.options,

@@ -75,3 +77,3 @@ props = _ref2.props;

});
return Object.assign({}, emitEvent.options, options, wildcardVar, emitArgs && (0, _util.isObject)(emitArgs[0]) ? emitArgs[0] : undefined);
return Object.assign({}, events.defaultOptions, emitEvent.options, options, wildcardVar, emitArgs && (0, _util.isObject)(emitArgs[0]) ? emitArgs[0] : undefined);
} else {

@@ -78,0 +80,0 @@ return options;

@@ -13,3 +13,7 @@ // Helpers

export class Events {
constructor({ name = "events" } = {}) {
constructor({
defaultOptions = {},
name = "events",
} = {}) {
this.defaultOptions = defaultOptions
this.name = name

@@ -35,2 +39,10 @@ this.ops = new Set()

setDefaultOptions(options) {
this.defaultOptions = {
...this.defaultOptions,
...options,
}
return this
}
setOp(op) {

@@ -37,0 +49,0 @@ opBase({ op, options: { events: this } })

@@ -26,2 +26,3 @@ import { propVar } from "./props"

emitEvent,
events,
options,

@@ -59,2 +60,3 @@ props,

emitEvent,
events,
options,

@@ -71,2 +73,3 @@ props,

{},
events.defaultOptions,
emitEvent.options,

@@ -73,0 +76,0 @@ options,

@@ -15,3 +15,3 @@ {

],
"version": "2.2.0",
"version": "2.3.0",
"description": "Build beautiful and extensible eventing APIs",

@@ -18,0 +18,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc