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

@govflanders/vl-widget-event

Package Overview
Dependencies
Maintainers
13
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@govflanders/vl-widget-event - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

2

dist/index.js

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var eventemitter2=require("eventemitter2"),vlWidgetUtility=require("@govflanders/vl-widget-utility"),extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function __extends(t,e){function n(){this.constructor=t}extendStatics(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function suppressEventEmitter2UnhandledError(){}!function(t){t.Self="self",t.Broadcast="broadcast"}(exports.EventScope||(exports.EventScope={}));var EventEmitterBase=function(){function t(t){this.emitter=new eventemitter2.EventEmitter2(t),this.subscribedEventBroadcasts=[],this.eventLocks={},this.emitter.on("error",suppressEventEmitter2UnhandledError)}return t.prototype.hasEventLock=function(t){return!!this.eventLocks[t.getEventId()]},t.prototype.acquireEventLock=function(t){return this.eventLocks[t.getEventId()]=!0,this},t.prototype.releaseEventLock=function(t){return delete this.eventLocks[t.getEventId()],this},t.prototype.resolveEventBroadcast=function(t){var e=null;"function"==typeof t.getEventBroadcast?e=t.getEventBroadcast():"function"==typeof t&&(e=t);return e},t.prototype.createEventBroadcast=function(){var e=this;return function(t){return e.emit(t)}},t.prototype.getEventBroadcast=function(){return void 0===this.eventBroadcast&&(this.eventBroadcast=this.createEventBroadcast()),this.eventBroadcast},t.prototype.on=function(t,e){return this.addEventListener(t,e)},t.prototype.off=function(t,e){return this.removeEventListener(t,e)},t.prototype.once=function(t,e){return this.emitter.once(t,e),this},t.prototype.addEventListener=function(t,e){for(var n=0,r=Array.isArray(t)?t:[t];n<r.length;n++){var o=r[n];this.emitter.addListener(o,e)}return this},t.prototype.removeEventListener=function(t,e){for(var n=0,r=Array.isArray(t)?t:[t];n<r.length;n++){var o=r[n];this.emitter.removeListener(o,e)}return this},t.prototype.addEventBroadcast=function(t){var e=this.resolveEventBroadcast(t);return null!==e&&-1===this.subscribedEventBroadcasts.indexOf(e)&&this.subscribedEventBroadcasts.push(e),this},t.prototype.removeEventBroadcast=function(t){var e=this.resolveEventBroadcast(t);if(null!==e){var n=this.subscribedEventBroadcasts.indexOf(e);-1<n&&this.subscribedEventBroadcasts.slice(n,1)}return this},t.prototype.emit=function(r){var o=this;return new Promise(function(t,e){if(o.hasEventLock(r))t();else{o.acquireEventLock(r);var n=[o.emitter.emitAsync(r.getEventName(),r)];r.getEventScope()===exports.EventScope.Broadcast&&o.subscribedEventBroadcasts.forEach(function(t){n.push(t(r))}),Promise.all(n).then(function(){o.releaseEventLock(r),t()}).catch(function(t){o.releaseEventLock(r),e(t)})}})},t}(),defaultEventEmitterOptions={newListener:!1,maxListeners:0},DefaultEventEmitter=function(e){function t(t){return e.call(this,Object.assign({},defaultEventEmitterOptions,t))||this}return __extends(t,e),t}(EventEmitterBase),EventSourceBase=function(){function t(){}return t.prototype.createEventEmitter=function(){return new DefaultEventEmitter},t.prototype.getEventEmitter=function(){return void 0===this.eventEmitter&&(this.eventEmitter=this.createEventEmitter()),this.eventEmitter},t.prototype.getEventBroadcast=function(){return this.getEventEmitter().getEventBroadcast()},t.prototype.on=function(t,e){return this.getEventEmitter().on(t,e),this},t.prototype.off=function(t,e){return this.getEventEmitter().off(t,e),this},t.prototype.once=function(t,e){return this.getEventEmitter().once(t,e),this},t.prototype.addEventListener=function(t,e){return this.getEventEmitter().addEventListener(t,e),this},t.prototype.removeEventListener=function(t,e){return this.getEventEmitter().removeEventListener(t,e),this},t.prototype.addEventBroadcast=function(t){return this.getEventEmitter().addEventBroadcast(t),this},t.prototype.removeEventBroadcast=function(t){return this.getEventEmitter().removeEventBroadcast(t),this},t.prototype.emit=function(t){return this.getEventEmitter().emit(t)},t}(),EventBase=function(){function t(t,e,n){void 0===n&&(n=exports.EventScope.Broadcast),this.eventId=vlWidgetUtility.Uuid.generate(),this.eventName=t,this.sender=e,this.eventScope=n}return t.prototype.getEventId=function(){return this.eventId},t.prototype.getEventScope=function(){return this.eventScope},t.prototype.getEventName=function(){return this.eventName},t.prototype.getSender=function(){return this.sender},t.prototype.rename=function(t){var e=Object.create(this);return e.eventName=t,e},t.prototype.prefix=function(t){var e=this.getEventName();return 0<t.length&&(e=t+"."+e),this.rename(e)},t.prototype.suffix=function(t){var e=this.getEventName();return 0<t.length&&(e=e+"."+t),this.rename(e)},t}(),CustomEvent=function(i){function t(t,e,n,r){void 0===r&&(r=exports.EventScope.Broadcast);var o=i.call(this,t,e,r)||this;return o.eventData=n,o}return __extends(t,i),t.prototype.getEventData=function(){return this.eventData},t}(EventBase);exports.CustomEvent=CustomEvent,exports.DefaultEventEmitter=DefaultEventEmitter,exports.EventBase=EventBase,exports.EventEmitterBase=EventEmitterBase,exports.EventSourceBase=EventSourceBase,exports.defaultEventEmitterOptions=defaultEventEmitterOptions;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var eventemitter2=require("eventemitter2"),vlWidgetUtility=require("@govflanders/vl-widget-utility"),extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function __extends(t,e){function n(){this.constructor=t}extendStatics(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function suppressEventEmitter2UnhandledError(){}!function(t){t.Self="self",t.Broadcast="broadcast"}(exports.EventScope||(exports.EventScope={}));var EventEmitterBase=function(){function t(t){this.emitter=new eventemitter2.EventEmitter2(t),this.subscribedEventBroadcasts=[],this.eventLocks={},this.emitter.on("error",suppressEventEmitter2UnhandledError)}return t.prototype.hasEventLock=function(t){return!!this.eventLocks[t.getEventId()]},t.prototype.acquireEventLock=function(t){return this.eventLocks[t.getEventId()]=!0,this},t.prototype.releaseEventLock=function(t){return delete this.eventLocks[t.getEventId()],this},t.prototype.resolveEventBroadcast=function(t){var e=null;"function"==typeof t.getEventBroadcast?e=t.getEventBroadcast():"function"==typeof t&&(e=t);return e},t.prototype.createEventBroadcast=function(){var e=this;return function(t){return e.emit(t)}},t.prototype.getEventBroadcast=function(){return void 0===this.eventBroadcast&&(this.eventBroadcast=this.createEventBroadcast()),this.eventBroadcast},t.prototype.on=function(t,e){return this.addEventListener(t,e)},t.prototype.off=function(t,e){return this.removeEventListener(t,e)},t.prototype.once=function(t,e){return this.emitter.once(t,e),this},t.prototype.addEventListener=function(t,e){for(var n=0,r=Array.isArray(t)?t:[t];n<r.length;n++){var o=r[n];this.emitter.addListener(o,e)}return this},t.prototype.removeEventListener=function(t,e){for(var n=0,r=Array.isArray(t)?t:[t];n<r.length;n++){var o=r[n];this.emitter.removeListener(o,e)}return this},t.prototype.addEventBroadcast=function(t){var e=this.resolveEventBroadcast(t);return null!==e&&-1===this.subscribedEventBroadcasts.indexOf(e)&&this.subscribedEventBroadcasts.push(e),this},t.prototype.removeEventBroadcast=function(t){var e=this.resolveEventBroadcast(t);if(null!==e){var n=this.subscribedEventBroadcasts.indexOf(e);-1<n&&this.subscribedEventBroadcasts.slice(n,1)}return this},t.prototype.emit=function(r){var o=this;return new Promise(function(t,e){if(o.hasEventLock(r))t();else{o.acquireEventLock(r);var n=[o.emitter.emitAsync(r.getEventName(),r)];r.getEventScope()===exports.EventScope.Broadcast&&o.subscribedEventBroadcasts.forEach(function(t){n.push(t(r))}),Promise.all(n).then(function(){o.releaseEventLock(r),t()}).catch(function(t){o.releaseEventLock(r),e(t)})}})},t}(),defaultEventEmitterOptions={newListener:!1,maxListeners:0},DefaultEventEmitter=function(e){function t(t){return e.call(this,Object.assign({},defaultEventEmitterOptions,t))||this}return __extends(t,e),t}(EventEmitterBase),EventSourceBase=function(){function t(){}return t.prototype.createEventEmitter=function(){return new DefaultEventEmitter},t.prototype.getEventEmitter=function(){return void 0===this.eventEmitter&&(this.eventEmitter=this.createEventEmitter()),this.eventEmitter},t.prototype.getEventBroadcast=function(){return this.getEventEmitter().getEventBroadcast()},t.prototype.on=function(t,e){return this.getEventEmitter().on(t,e),this},t.prototype.off=function(t,e){return this.getEventEmitter().off(t,e),this},t.prototype.once=function(t,e){return this.getEventEmitter().once(t,e),this},t.prototype.addEventListener=function(t,e){return this.getEventEmitter().addEventListener(t,e),this},t.prototype.removeEventListener=function(t,e){return this.getEventEmitter().removeEventListener(t,e),this},t.prototype.addEventBroadcast=function(t){return this.getEventEmitter().addEventBroadcast(t),this},t.prototype.removeEventBroadcast=function(t){return this.getEventEmitter().removeEventBroadcast(t),this},t.prototype.emit=function(t){return this.getEventEmitter().emit(t)},t}(),EventBase=function(){function t(t,e,n){void 0===n&&(n=exports.EventScope.Broadcast),this.eventId=vlWidgetUtility.Uuid.generate(),this.eventName=t,this.sender=e,this.eventScope=n}return t.prototype.getEventId=function(){return this.eventId},t.prototype.getEventScope=function(){return this.eventScope},t.prototype.getEventName=function(){return this.eventName},t.prototype.getSender=function(){return this.sender},t.prototype.rename=function(t){var e=Object.create(this);return e.eventName=t,e},t.prototype.prefix=function(t){var e=this.getEventName();return 0<t.length&&(e=t+"."+e),this.rename(e)},t.prototype.suffix=function(t){var e=this.getEventName();return 0<t.length&&(e=e+"."+t),this.rename(e)},t.prototype.toString=function(){return this.getEventName()},t}(),CustomEvent=function(i){function t(t,e,n,r){void 0===r&&(r=exports.EventScope.Broadcast);var o=i.call(this,t,e,r)||this;return o.eventData=n,o}return __extends(t,i),t.prototype.getEventData=function(){return this.eventData},t}(EventBase);exports.CustomEvent=CustomEvent,exports.DefaultEventEmitter=DefaultEventEmitter,exports.EventBase=EventBase,exports.EventEmitterBase=EventEmitterBase,exports.EventSourceBase=EventSourceBase,exports.defaultEventEmitterOptions=defaultEventEmitterOptions;
{
"name": "@govflanders/vl-widget-event",
"version": "1.2.1",
"version": "1.2.2",
"license": "MIT",

@@ -26,5 +26,5 @@ "contributors": [

"dependencies": {
"@govflanders/vl-widget-utility": "^1.2.1",
"@govflanders/vl-widget-utility": "^1.2.2",
"eventemitter2": "5.0.1"
}
}

@@ -132,2 +132,6 @@ import { EventScope } from './event-scope';

suffix(eventNameSuffix: string): this;
/**
* {@inheritdoc}
*/
toString(): string;
}

@@ -134,0 +138,0 @@ /**

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