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

@uxland/event-aggregator

Package Overview
Dependencies
Maintainers
2
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uxland/event-aggregator - npm Package Compare versions

Comparing version 1.0.1-alpha.4 to 1.0.1-alpha.5

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [1.0.1-alpha.5](https://github.com/uxland/uxland/compare/@uxland/event-aggregator@1.0.1-alpha.4...@uxland/event-aggregator@1.0.1-alpha.5) (2021-03-11)
**Note:** Version bump only for package @uxland/event-aggregator
## [1.0.1-alpha.4](https://github.com/uxland/uxland/compare/@uxland/event-aggregator@1.0.1-alpha.3...@uxland/event-aggregator@1.0.1-alpha.4) (2021-03-11)

@@ -8,0 +16,0 @@

2

es/event-aggregator.js

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

var o=1;o=1;o=1;var c=class{constructor(e,i){this.messageType=e,this.callback=i}handle(e){e instanceof this.messageType&&this.callback.call(null,e)}},b=(r,e,i)=>{try{r(e,i)}catch(s){console.error(s)}},p=(r,e)=>{try{r.handle(e)}catch(i){console.error(i)}},l=class{constructor(){this.eventLookup={},this.messageHandlers=[]}publish(e,i){let s,n;if(!e)throw new Error("Event channel/type is invalid.");if(typeof e=="string"){if(s=this.eventLookup[e],s)for(s=s.slice(),n=s.length;n--;)b(s[n],i,e)}else for(s=this.messageHandlers.slice(),n=s.length;n--;)p(s[n],e)}subscribe(e,i){let s,n;if(!e)throw new Error("Event channel/type is invalid.");return typeof e=="string"?(s=i,n=this.eventLookup[e]||(this.eventLookup[e]=[])):(s=new c(e,i),n=this.messageHandlers),n.push(s),{dispose(){let a=n.indexOf(s);a!==-1&&n.splice(a,1)}}}subscribeOnce(e,i){let s=this.subscribe(e,(n,a)=>(s.dispose(),i(n,a)));return s}},t=new l,d=t.subscribe.bind(t),h=t.subscribeOnce.bind(t),u=t.publish.bind(t);export{l as EventAggregator,t as eventAggregator,u as publish,d as subscribe,h as subscribeOnce};
let l=1;l=1,l=1;class c{constructor(e,t){this.messageType=e,this.callback=t}handle(e){e instanceof this.messageType&&this.callback.call(null,e)}}const b=(r,e,t)=>{try{r(e,t)}catch(s){console.error(s)}},p=(r,e)=>{try{r.handle(e)}catch(t){console.error(t)}};class o{constructor(){this.eventLookup={},this.messageHandlers=[]}publish(e,t){let s,n;if(!e)throw new Error("Event channel/type is invalid.");if(typeof e=="string"){if(s=this.eventLookup[e],s)for(s=s.slice(),n=s.length;n--;)b(s[n],t,e)}else for(s=this.messageHandlers.slice(),n=s.length;n--;)p(s[n],e)}subscribe(e,t){let s,n;if(!e)throw new Error("Event channel/type is invalid.");return typeof e=="string"?(s=t,n=this.eventLookup[e]||(this.eventLookup[e]=[])):(s=new c(e,t),n=this.messageHandlers),n.push(s),{dispose(){const a=n.indexOf(s);a!==-1&&n.splice(a,1)}}}subscribeOnce(e,t){const s=this.subscribe(e,(n,a)=>(s.dispose(),t(n,a)));return s}}const i=new o,d=i.subscribe.bind(i),h=i.subscribeOnce.bind(i),u=i.publish.bind(i);export{o as EventAggregator,i as eventAggregator,u as publish,d as subscribe,h as subscribeOnce};

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

var l=1;l=1;l=1;var c=class{constructor(e,t){this.messageType=e,this.callback=t}handle(e){e instanceof this.messageType&&this.callback.call(null,e)}},b=(i,e,t)=>{try{i(e,t)}catch(s){console.error(s)}},p=(i,e)=>{try{i.handle(e)}catch(t){console.error(t)}},o=class{constructor(){this.eventLookup={},this.messageHandlers=[]}publish(e,t){let s,n;if(!e)throw new Error("Event channel/type is invalid.");if(typeof e=="string"){if(s=this.eventLookup[e],s)for(s=s.slice(),n=s.length;n--;)b(s[n],t,e)}else for(s=this.messageHandlers.slice(),n=s.length;n--;)p(s[n],e)}subscribe(e,t){let s,n;if(!e)throw new Error("Event channel/type is invalid.");return typeof e=="string"?(s=t,n=this.eventLookup[e]||(this.eventLookup[e]=[])):(s=new c(e,t),n=this.messageHandlers),n.push(s),{dispose(){let a=n.indexOf(s);a!==-1&&n.splice(a,1)}}}subscribeOnce(e,t){let s=this.subscribe(e,(n,a)=>(s.dispose(),t(n,a)));return s}},r=new o,d=r.subscribe.bind(r),u=r.subscribeOnce.bind(r),h=r.publish.bind(r);console.log("@uxland/event-aggregator loaded");export{o as EventAggregator,r as eventAggregator,h as publish,d as subscribe,u as subscribeOnce};
/*

@@ -18,2 +17,2 @@ * @license

* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
*/export*from"./event-aggregator";console.log("@uxland/event-aggregator loaded");
{
"name": "@uxland/event-aggregator",
"version": "1.0.1-alpha.4",
"version": "1.0.1-alpha.5",
"description": "Event Aggregator",

@@ -48,3 +48,3 @@ "author": "UXLand <dev@uxland.es>",

"esbuild:cjs": "esbuild src/index.ts --bundle --minify --target=es2018 --outfile=lib/index.js && yarn esbuild:dts",
"esbuild:es": "esbuild src/*.ts --bundle --minify --format=esm --outdir=es",
"esbuild:es": "esbuild src/*.ts --minify --format=esm --outdir=es",
"esbuild": "npm-run-all --parallel esbuild:es esbuild:cjs"

@@ -81,3 +81,3 @@ },

},
"gitHead": "068a84b3e7d6b39e6f5e7e9e9c8a79af5beffb65"
"gitHead": "cc0d89c0ad4c2d6ba1da20b417bc9455647c6ff9"
}
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