diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bd59e3..bd1e4d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # CHANGELOG +## v3.2.6 +- Ensure that listeners registered on the same topic are invoked in the order they are added. +- Minor updates on documentation. +- Update angular_1.x_example. + ## v3.2.5 - Add working example using Angular 1.x. - Update devDependencies. diff --git a/dist/pubsub.min.js b/dist/pubsub.min.js index e7bedc3..2d0402f 100644 --- a/dist/pubsub.min.js +++ b/dist/pubsub.min.js @@ -2,12 +2,12 @@ * PubSub * Javascript implementation of the Publish/Subscribe pattern. * - * @version 3.2.5 + * @version 3.2.6 * @author George Raptis (georapbox.github.io) * @homepage https://github.com/georapbox/PubSub#readme * @repository https://github.com/georapbox/PubSub.git * @license MIT */ -!function(a,b,c){"use strict";"function"==typeof define&&define.amd?define(c):"undefined"!=typeof module&&module.exports?module.exports=c():b.PubSub=c()}(0,this,function(){"use strict";function a(){var b,c,d;for(b=1,c=arguments.length;b0)return d=!0,!1}),d):!!(Object.prototype.hasOwnProperty.call(c,a)&&c[a].length>0)},f.prototype.subscribers=function(){return a({},this._pubsub_topics)},f.prototype.subscribersByTopic=function(a){return this._pubsub_topics[a]?this._pubsub_topics[a].slice(0):[]},f.prototype.alias=function(a){return b(a,function(b,d){f.prototype[d]&&(f.prototype[a[d]]=c(d))}),this},f}); -//# sourceMappingURL=pubsub.min.js.map +!function(t,n,r){"use strict";"function"==typeof define&&define.amd?define(r):"undefined"!=typeof module&&module.exports?module.exports=r():n.PubSub=r()}(0,this,function(){"use strict";function t(){var n,r,o;for(n=1,r=arguments.length;n0)return o=!0,!1}),o):!!(Object.prototype.hasOwnProperty.call(r,t)&&r[t].length>0)},e.prototype.subscribers=function(){return t({},this._pubsub_topics)},e.prototype.subscribersByTopic=function(t){return this._pubsub_topics[t]?this._pubsub_topics[t].slice(0):[]},e.prototype.alias=function(t){return n(t,function(n,o){e.prototype[o]&&(e.prototype[t[o]]=r(o))}),this},e}); +//# sourceMappingURL=pubsub.min.js.map \ No newline at end of file diff --git a/dist/pubsub.min.js.map b/dist/pubsub.min.js.map index 89d02ea..94d035b 100644 --- a/dist/pubsub.min.js.map +++ b/dist/pubsub.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/pubsub.js"],"names":["name","context","definition","define","amd","module","exports","this","extend","i","l","key","arguments","length","Object","prototype","hasOwnProperty","call","constructor","forOwn","obj","callback","thisArg","alias","fn","apply","deliverTopic","instance","topic","data","currentSubscriber","token","topics","_pubsub_topics","subscribers","len","once","unsubscribe","publish","sync","setTimeout","PubSub","_pubsub_uid","subscribe","TypeError","push","subscribeOnce","publishSync","prop","tf","splice","unsubscribeAll","topicValue","topicKey","hasSubscribers","subscribersByTopic","slice","aliasMap","value"],"mappings":";;;;;;;;;;;CAUC,SAAUA,EAAMC,EAASC,GACxB,YACsB,mBAAXC,SAAyBA,OAAOC,IACzCD,OAAOD,GACoB,mBAAXG,SAA0BA,OAAOC,QACjDD,OAAOC,QAAUJ,IAEjBD,EAAY,OAAIC,KAElB,EAAUK,KAAM,WAChB,YAEA,SAASC,KACP,GAAIC,GAAGC,EAAGC,CAEV,KAAKF,EAAI,EAAGC,EAAIE,UAAUC,OAAQJ,EAAIC,EAAGD,IACvC,IAAKE,IAAOC,WAAUH,GAChBK,OAAOC,UAAUC,eAAeC,KAAKL,UAAUH,GAAIE,KACjDC,UAAUH,GAAGE,IAAQC,UAAUH,GAAGE,GAAKO,aACvCN,UAAUH,GAAGE,GAAKO,cAAgBJ,QACpCF,UAAU,GAAGD,GAAOC,UAAU,GAAGD,OACjCH,EAAOI,UAAU,GAAGD,GAAMC,UAAUH,GAAGE,KAEvCC,UAAU,GAAGD,GAAOC,UAAUH,GAAGE,GAMzC,OAAOC,WAAU,GAGnB,QAASO,GAAOC,EAAKC,EAAUC,GAC7B,GAAIX,EAEJ,KAAKA,IAAOS,GACV,GAAIN,OAAOC,UAAUC,eAAeC,KAAKG,EAAKT,IACxCU,IAA2D,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8B,EAAO1B,UAAU0C,EAAS9C,IAAQY,EAAMZ,MAIrCJ,MAGFkC","file":"pubsub.min.js"} \ No newline at end of file +{"version":3,"sources":["../src/pubsub.js"],"names":["name","context","definition","define","amd","module","exports","this","extend","i","l","key","arguments","length","Object","prototype","hasOwnProperty","call","constructor","forOwn","obj","callback","thisArg","alias","fn","apply","deliverTopic","instance","topic","data","currentSubscriber","token","subscribers","_pubsub_topics","len","once","unsubscribe","publish","sync","setTimeout","PubSub","_pubsub_uid","subscribe","topics","TypeError","push","subscribeOnce","publishSync","prop","tf","splice","unsubscribeAll","topicValue","topicKey","hasSubscribers","subscribersByTopic","slice","aliasMap","value"],"mappings":";;;;;;;;;;;CAUC,SAAUA,EAAMC,EAASC,GACxB,aACsB,mBAAXC,QAAyBA,OAAOC,IACzCD,OAAOD,GACoB,oBAAXG,QAA0BA,OAAOC,QACjDD,OAAOC,QAAUJ,IAEjBD,EAAY,OAAIC,KAElB,EAAUK,KAAM,WAChB,aAEA,SAASC,IACP,IAAIC,EAAGC,EAAGC,EAEV,IAAKF,EAAI,EAAGC,EAAIE,UAAUC,OAAQJ,EAAIC,EAAGD,IACvC,IAAKE,KAAOC,UAAUH,GAChBK,OAAOC,UAAUC,eAAeC,KAAKL,UAAUH,GAAIE,KACjDC,UAAUH,GAAGE,IAAQC,UAAUH,GAAGE,GAAKO,aACvCN,UAAUH,GAAGE,GAAKO,cAAgBJ,QACpCF,UAAU,GAAGD,GAAOC,UAAU,GAAGD,OACjCH,EAAOI,UAAU,GAAGD,GAAMC,UAAUH,GAAGE,KAEvCC,UAAU,GAAGD,GAAOC,UAAUH,GAAGE,IAMzC,OAAOC,UAAU,GAGnB,SAASO,EAAOC,EAAKC,EAAUC,GAC7B,IAAIX,EAEJ,IAAKA,KAAOS,EACV,GAAIN,OAAOC,UAAUC,eAAeC,KAAKG,EAAKT,IACxCU,IAA2D,IAA/CA,EAASJ,KAAKK,EAASF,EAAIT,GAAMA,EAAKS,GACpD,OAKN,OAA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} \ No newline at end of file diff --git a/package.json b/package.json index 08bcf79..de9802c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "PubSub", - "version": "3.2.5", + "version": "3.2.6", "description": "Javascript implementation of the Publish/Subscribe pattern.", "main": "src/pubsub.js", "scripts": {