Comparing version 0.8.7 to 0.8.8
@@ -5,4 +5,5 @@ /* | ||
License: Dual licensed MIT (http://www.opensource.org/licenses/mit-license) & GPL (http://www.opensource.org/licenses/gpl-license) | ||
Version 0.8.7 | ||
Version 0.8.8 | ||
*/ | ||
/*jshint -W098 */ | ||
(function ( root, factory ) { | ||
@@ -14,3 +15,3 @@ if ( typeof module === "object" && module.exports ) { | ||
return factory( _ ); | ||
} | ||
}; | ||
} else if ( typeof define === "function" && define.amd ) { | ||
@@ -27,5 +28,5 @@ // AMD. Register as an anonymous module. | ||
var DEFAULT_CHANNEL = "/", | ||
DEFAULT_DISPOSEAFTER = 0, | ||
SYSTEM_CHANNEL = "postal"; | ||
var postal; | ||
/*jshint -W098 */ | ||
var ConsecutiveDistinctPredicate = function () { | ||
@@ -46,2 +47,3 @@ var previous; | ||
}; | ||
/*jshint -W098 */ | ||
var DistinctPredicate = function () { | ||
@@ -63,4 +65,5 @@ var previous = []; | ||
}; | ||
/* global postal, SubscriptionDefinition */ | ||
var ChannelDefinition = function ( channelName ) { | ||
this.channel = channelName || DEFAULT_CHANNEL; | ||
this.channel = channelName || postal.configuration.DEFAULT_CHANNEL; | ||
}; | ||
@@ -76,9 +79,11 @@ | ||
var envelope = arguments.length === 1 ? | ||
(Object.prototype.toString.call(arguments[0]) === '[object String]' ? | ||
{ topic: arguments[0] } : | ||
arguments[0]) : | ||
{ topic : arguments[0], data : arguments[1] }; | ||
( Object.prototype.toString.call( arguments[0] ) === "[object String]" ? | ||
{ topic : arguments[0] } : | ||
arguments[0] ) : | ||
{ topic : arguments[0], data : arguments[1] }; | ||
envelope.channel = this.channel; | ||
return postal.configuration.bus.publish( envelope ); | ||
}; | ||
/* global postal */ | ||
/*jshint -W117 */ | ||
var SubscriptionDefinition = function ( channel, topic, callback ) { | ||
@@ -91,8 +96,8 @@ this.channel = channel; | ||
postal.configuration.bus.publish( { | ||
channel : SYSTEM_CHANNEL, | ||
topic : "subscription.created", | ||
data : { | ||
event : "subscription.created", | ||
channel : postal.configuration.SYSTEM_CHANNEL, | ||
topic : "subscription.created", | ||
data : { | ||
event : "subscription.created", | ||
channel : channel, | ||
topic : topic | ||
topic : topic | ||
} | ||
@@ -105,12 +110,12 @@ } ); | ||
unsubscribe : function () { | ||
if(!this.inactive) { | ||
if ( !this.inactive ) { | ||
this.inactive = true; | ||
postal.configuration.bus.unsubscribe( this ); | ||
postal.configuration.bus.publish( { | ||
channel : SYSTEM_CHANNEL, | ||
topic : "subscription.removed", | ||
data : { | ||
event : "subscription.removed", | ||
channel : postal.configuration.SYSTEM_CHANNEL, | ||
topic : "subscription.removed", | ||
data : { | ||
event : "subscription.removed", | ||
channel : this.channel, | ||
topic : this.topic | ||
topic : this.topic | ||
} | ||
@@ -122,6 +127,7 @@ } ); | ||
defer : function () { | ||
var self = this; | ||
var fn = this.callback; | ||
this.callback = function ( data, env ) { | ||
setTimeout( function () { | ||
fn( data, env ); | ||
fn.call( self.context, data, env ); | ||
}, 0 ); | ||
@@ -136,2 +142,3 @@ }; | ||
} | ||
var self = this; | ||
var fn = this.callback; | ||
@@ -143,3 +150,3 @@ var dispose = _.after( maxCalls, _.bind( function () { | ||
this.callback = function () { | ||
fn.apply( this.context, arguments ); | ||
fn.apply( self.context, arguments ); | ||
dispose(); | ||
@@ -188,3 +195,3 @@ }; | ||
withDebounce : function ( milliseconds ) { | ||
withDebounce : function ( milliseconds, immediate ) { | ||
if ( _.isNaN( milliseconds ) ) { | ||
@@ -194,3 +201,3 @@ throw "Milliseconds must be a number"; | ||
var fn = this.callback; | ||
this.callback = _.debounce( fn, milliseconds ); | ||
this.callback = _.debounce( fn, milliseconds, !!immediate ); | ||
return this; | ||
@@ -203,6 +210,7 @@ }, | ||
} | ||
var self = this; | ||
var fn = this.callback; | ||
this.callback = function ( data, env ) { | ||
setTimeout( function () { | ||
fn( data, env ); | ||
fn.call( self.context, data, env ); | ||
}, milliseconds ); | ||
@@ -227,2 +235,3 @@ }; | ||
}; | ||
/*jshint -W098 */ | ||
var bindingsResolver = { | ||
@@ -233,16 +242,16 @@ cache : {}, | ||
compare : function ( binding, topic ) { | ||
var pattern, rgx, prevSegment, result = (this.cache[topic] && this.cache[topic][binding]); | ||
if(typeof result !== "undefined") { | ||
var pattern, rgx, prevSegment, result = ( this.cache[ topic ] && this.cache[ topic ][ binding ] ); | ||
if ( typeof result !== "undefined" ) { | ||
return result; | ||
} | ||
if(!(rgx = this.regex[binding])) { | ||
pattern = "^" + _.map(binding.split('.'), function(segment) { | ||
if ( !( rgx = this.regex[ binding ] )) { | ||
pattern = "^" + _.map( binding.split( "." ),function ( segment ) { | ||
var res = ""; | ||
if (!!prevSegment) { | ||
if ( !!prevSegment ) { | ||
res = prevSegment !== "#" ? "\\.\\b" : "\\b"; | ||
} | ||
if(segment === "#") { | ||
res += "[\\s\\S]*" | ||
} else if (segment === "*") { | ||
res += "[^.]+" | ||
if ( segment === "#" ) { | ||
res += "[\\s\\S]*"; | ||
} else if ( segment === "*" ) { | ||
res += "[^.]+"; | ||
} else { | ||
@@ -253,7 +262,7 @@ res += segment; | ||
return res; | ||
} ).join('') + "$"; | ||
rgx = this.regex[binding] = new RegExp( pattern ); | ||
} ).join( "" ) + "$"; | ||
rgx = this.regex[ binding ] = new RegExp( pattern ); | ||
} | ||
this.cache[topic] = this.cache[topic] || {}; | ||
this.cache[topic][binding] = result = rgx.test( topic ); | ||
this.cache[ topic ] = this.cache[ topic ] || {}; | ||
this.cache[ topic ][ binding ] = result = rgx.test( topic ); | ||
return result; | ||
@@ -267,2 +276,3 @@ }, | ||
}; | ||
/* global postal */ | ||
var fireSub = function ( subDef, envelope ) { | ||
@@ -273,3 +283,3 @@ if ( !subDef.inactive && postal.configuration.resolver.compare( subDef.topic, envelope.topic ) ) { | ||
} ) ) { | ||
if ( typeof subDef.callback === 'function' ) { | ||
if ( typeof subDef.callback === "function" ) { | ||
subDef.callback.call( subDef.context, envelope.data, envelope ); | ||
@@ -337,3 +347,3 @@ } | ||
subscribe : function ( subDef ) { | ||
var idx, found, fn, channel = this.subscriptions[subDef.channel], subs; | ||
var channel = this.subscriptions[subDef.channel], subs; | ||
if ( !channel ) { | ||
@@ -372,12 +382,13 @@ channel = this.subscriptions[subDef.channel] = {}; | ||
}; | ||
localBus.subscriptions[SYSTEM_CHANNEL] = {}; | ||
var postal = { | ||
/* global localBus, bindingsResolver, ChannelDefinition, SubscriptionDefinition, postal */ | ||
/*jshint -W020 */ | ||
postal = { | ||
configuration : { | ||
bus : localBus, | ||
resolver : bindingsResolver, | ||
DEFAULT_CHANNEL : DEFAULT_CHANNEL, | ||
SYSTEM_CHANNEL : SYSTEM_CHANNEL | ||
bus : localBus, | ||
resolver : bindingsResolver, | ||
DEFAULT_CHANNEL : "/", | ||
SYSTEM_CHANNEL : "postal" | ||
}, | ||
ChannelDefinition : ChannelDefinition, | ||
ChannelDefinition : ChannelDefinition, | ||
SubscriptionDefinition : SubscriptionDefinition, | ||
@@ -390,7 +401,7 @@ | ||
subscribe : function ( options ) { | ||
return new SubscriptionDefinition( options.channel || DEFAULT_CHANNEL, options.topic, options.callback ); | ||
return new SubscriptionDefinition( options.channel || postal.configuration.DEFAULT_CHANNEL, options.topic, options.callback ); | ||
}, | ||
publish : function ( envelope ) { | ||
envelope.channel = envelope.channel || DEFAULT_CHANNEL; | ||
envelope.channel = envelope.channel || postal.configuration.DEFAULT_CHANNEL; | ||
return postal.configuration.bus.publish( envelope ); | ||
@@ -404,4 +415,4 @@ }, | ||
linkChannels : function ( sources, destinations ) { | ||
var result = []; | ||
sources = !_.isArray( sources ) ? [sources] : sources; | ||
var result = []; | ||
sources = !_.isArray( sources ) ? [ sources ] : sources; | ||
destinations = !_.isArray( destinations ) ? [destinations] : destinations; | ||
@@ -411,7 +422,7 @@ _.each( sources, function ( source ) { | ||
_.each( destinations, function ( destination ) { | ||
var destChannel = destination.channel || DEFAULT_CHANNEL; | ||
var destChannel = destination.channel || postal.configuration.DEFAULT_CHANNEL; | ||
result.push( | ||
postal.subscribe( { | ||
channel : source.channel || DEFAULT_CHANNEL, | ||
topic : source.topic || "#", | ||
channel : source.channel || postal.configuration.DEFAULT_CHANNEL, | ||
topic : sourceTopic, | ||
callback : function ( data, env ) { | ||
@@ -440,3 +451,3 @@ var newEnv = _.clone( env ); | ||
if ( postal.configuration.bus.subscriptions[ channel ] && | ||
Object.prototype.hasOwnProperty.call( postal.configuration.bus.subscriptions[ channel ], tpc )) { | ||
Object.prototype.hasOwnProperty.call( postal.configuration.bus.subscriptions[ channel ], tpc ) ) { | ||
return postal.configuration.bus.subscriptions[ channel ][ tpc ]; | ||
@@ -453,4 +464,13 @@ } | ||
}; | ||
localBus.subscriptions[postal.configuration.SYSTEM_CHANNEL] = {}; | ||
/*jshint -W106 */ | ||
if ( global.hasOwnProperty( "__postalReady__" ) && _.isArray( global.__postalReady__ ) ) { | ||
while(global.__postalReady__.length) { | ||
global.__postalReady__.shift().onReady(postal); | ||
} | ||
} | ||
/*jshint +W106 */ | ||
return postal; | ||
} )); |
@@ -5,4 +5,4 @@ /* | ||
License: Dual licensed MIT (http://www.opensource.org/licenses/mit-license) & GPL (http://www.opensource.org/licenses/gpl-license) | ||
Version 0.8.7 | ||
Version 0.8.8 | ||
*/ | ||
(function(t,n){"object"==typeof module&&module.exports?module.exports=function(t){return t=t||require("underscore"),n(t)}:"function"==typeof define&&define.amd?define(["underscore"],function(i){return n(i,t)}):t.postal=n(t._,t)})(this,function(t){var n="/",i="postal",s=function(){var n;return function(i){var s=!1;return t.isString(i)?(s=i===n,n=i):(s=t.isEqual(i,n),n=t.clone(i)),!s}},e=function(){var n=[];return function(i){var s=!t.any(n,function(n){return t.isObject(i)||t.isArray(i)?t.isEqual(i,n):i===n});return s&&n.push(i),s}},c=function(t){this.channel=t||n};c.prototype.subscribe=function(){return 1===arguments.length?new r(this.channel,arguments[0].topic,arguments[0].callback):new r(this.channel,arguments[0],arguments[1])},c.prototype.publish=function(){var t=1===arguments.length?"[object String]"===Object.prototype.toString.call(arguments[0])?{topic:arguments[0]}:arguments[0]:{topic:arguments[0],data:arguments[1]};return t.channel=this.channel,b.configuration.bus.publish(t)};var r=function(t,n,s){this.channel=t,this.topic=n,this.callback=s,this.constraints=[],this.context=null,b.configuration.bus.publish({channel:i,topic:"subscription.created",data:{event:"subscription.created",channel:t,topic:n}}),b.configuration.bus.subscribe(this)};r.prototype={unsubscribe:function(){this.inactive||(this.inactive=!0,b.configuration.bus.unsubscribe(this),b.configuration.bus.publish({channel:i,topic:"subscription.removed",data:{event:"subscription.removed",channel:this.channel,topic:this.topic}}))},defer:function(){var t=this.callback;return this.callback=function(n,i){setTimeout(function(){t(n,i)},0)},this},disposeAfter:function(n){if(t.isNaN(n)||0>=n)throw"The value provided to disposeAfter (maxCalls) must be a number greater than zero.";var i=this.callback,s=t.after(n,t.bind(function(){this.unsubscribe()},this));return this.callback=function(){i.apply(this.context,arguments),s()},this},distinctUntilChanged:function(){return this.withConstraint(new s),this},distinct:function(){return this.withConstraint(new e),this},once:function(){return this.disposeAfter(1),this},withConstraint:function(n){if(!t.isFunction(n))throw"Predicate constraint must be a function";return this.constraints.push(n),this},withConstraints:function(n){var i=this;return t.isArray(n)&&t.each(n,function(t){i.withConstraint(t)}),i},withContext:function(t){return this.context=t,this},withDebounce:function(n){if(t.isNaN(n))throw"Milliseconds must be a number";var i=this.callback;return this.callback=t.debounce(i,n),this},withDelay:function(n){if(t.isNaN(n))throw"Milliseconds must be a number";var i=this.callback;return this.callback=function(t,s){setTimeout(function(){i(t,s)},n)},this},withThrottle:function(n){if(t.isNaN(n))throw"Milliseconds must be a number";var i=this.callback;return this.callback=t.throttle(i,n),this},subscribe:function(t){return this.callback=t,this}};var o={cache:{},regex:{},compare:function(n,i){var s,e,c,r=this.cache[i]&&this.cache[i][n];return r!==undefined?r:((e=this.regex[n])||(s="^"+t.map(n.split("."),function(t){var n="";return c&&(n="#"!==c?"\\.\\b":"\\b"),n+="#"===t?"[\\s\\S]*":"*"===t?"[^.]+":t,c=t,n}).join("")+"$",e=this.regex[n]=RegExp(s)),this.cache[i]=this.cache[i]||{},this.cache[i][n]=r=e.test(i),r)},reset:function(){this.cache={},this.regex={}}},u=function(n,i){!n.inactive&&b.configuration.resolver.compare(n.topic,i.topic)&&t.all(n.constraints,function(t){return t.call(n.context,i.data,i)})&&"function"==typeof n.callback&&n.callback.call(n.context,i.data,i)},a=0,h=[],l=function(){for(;h.length;)h.shift().unsubscribe()},p={addWireTap:function(t){var n=this;return n.wireTaps.push(t),function(){var i=n.wireTaps.indexOf(t);-1!==i&&n.wireTaps.splice(i,1)}},publish:function(n){return++a,n.timeStamp=new Date,t.each(this.wireTaps,function(t){t(n.data,n)}),this.subscriptions[n.channel]&&t.each(this.subscriptions[n.channel],function(t){for(var i,s=0,e=t.length;e>s;)(i=t[s++])&&u(i,n)}),0===--a&&l(),n},reset:function(){this.subscriptions&&(t.each(this.subscriptions,function(n){t.each(n,function(t){for(;t.length;)t.pop().unsubscribe()})}),this.subscriptions={})},subscribe:function(t){var n,i=this.subscriptions[t.channel];return i||(i=this.subscriptions[t.channel]={}),n=this.subscriptions[t.channel][t.topic],n||(n=this.subscriptions[t.channel][t.topic]=[]),n.push(t),t},subscriptions:{},wireTaps:[],unsubscribe:function(t){if(a)return h.push(t),undefined;if(this.subscriptions[t.channel][t.topic])for(var n=this.subscriptions[t.channel][t.topic].length,i=0;n>i;){if(this.subscriptions[t.channel][t.topic][i]===t){this.subscriptions[t.channel][t.topic].splice(i,1);break}i+=1}}};p.subscriptions[i]={};var b={configuration:{bus:p,resolver:o,DEFAULT_CHANNEL:n,SYSTEM_CHANNEL:i},ChannelDefinition:c,SubscriptionDefinition:r,channel:function(t){return new c(t)},subscribe:function(t){return new r(t.channel||n,t.topic,t.callback)},publish:function(t){return t.channel=t.channel||n,b.configuration.bus.publish(t)},addWireTap:function(t){return this.configuration.bus.addWireTap(t)},linkChannels:function(i,s){var e=[];return i=t.isArray(i)?i:[i],s=t.isArray(s)?s:[s],t.each(i,function(i){i.topic||"#",t.each(s,function(s){var c=s.channel||n;e.push(b.subscribe({channel:i.channel||n,topic:i.topic||"#",callback:function(n,i){var e=t.clone(i);e.topic=t.isFunction(s.topic)?s.topic(i.topic):s.topic||i.topic,e.channel=c,e.data=n,b.publish(e)}}))})}),e},utils:{getSubscribersFor:function(){var t=arguments[0],n=arguments[1];return 1===arguments.length&&(t=arguments[0].channel||b.configuration.DEFAULT_CHANNEL,n=arguments[0].topic),b.configuration.bus.subscriptions[t]&&Object.prototype.hasOwnProperty.call(b.configuration.bus.subscriptions[t],n)?b.configuration.bus.subscriptions[t][n]:[]},reset:function(){b.configuration.bus.reset(),b.configuration.resolver.reset()}}};return b}); | ||
(function(t,n){"object"==typeof module&&module.exports?module.exports=function(t){return t=t||require("underscore"),n(t)}:"function"==typeof define&&define.amd?define(["underscore"],function(i){return n(i,t)}):t.postal=n(t._,t)})(this,function(t,n){var i,s=function(){var n;return function(i){var s=!1;return t.isString(i)?(s=i===n,n=i):(s=t.isEqual(i,n),n=t.clone(i)),!s}},c=function(){var n=[];return function(i){var s=!t.any(n,function(n){return t.isObject(i)||t.isArray(i)?t.isEqual(i,n):i===n});return s&&n.push(i),s}},e=function(t){this.channel=t||i.configuration.DEFAULT_CHANNEL};e.prototype.subscribe=function(){return 1===arguments.length?new r(this.channel,arguments[0].topic,arguments[0].callback):new r(this.channel,arguments[0],arguments[1])},e.prototype.publish=function(){var t=1===arguments.length?"[object String]"===Object.prototype.toString.call(arguments[0])?{topic:arguments[0]}:arguments[0]:{topic:arguments[0],data:arguments[1]};return t.channel=this.channel,i.configuration.bus.publish(t)};var r=function(t,n,s){this.channel=t,this.topic=n,this.callback=s,this.constraints=[],this.context=null,i.configuration.bus.publish({channel:i.configuration.SYSTEM_CHANNEL,topic:"subscription.created",data:{event:"subscription.created",channel:t,topic:n}}),i.configuration.bus.subscribe(this)};r.prototype={unsubscribe:function(){this.inactive||(this.inactive=!0,i.configuration.bus.unsubscribe(this),i.configuration.bus.publish({channel:i.configuration.SYSTEM_CHANNEL,topic:"subscription.removed",data:{event:"subscription.removed",channel:this.channel,topic:this.topic}}))},defer:function(){var t=this,n=this.callback;return this.callback=function(i,s){setTimeout(function(){n.call(t.context,i,s)},0)},this},disposeAfter:function(n){if(t.isNaN(n)||0>=n)throw"The value provided to disposeAfter (maxCalls) must be a number greater than zero.";var i=this,s=this.callback,c=t.after(n,t.bind(function(){this.unsubscribe()},this));return this.callback=function(){s.apply(i.context,arguments),c()},this},distinctUntilChanged:function(){return this.withConstraint(new s),this},distinct:function(){return this.withConstraint(new c),this},once:function(){return this.disposeAfter(1),this},withConstraint:function(n){if(!t.isFunction(n))throw"Predicate constraint must be a function";return this.constraints.push(n),this},withConstraints:function(n){var i=this;return t.isArray(n)&&t.each(n,function(t){i.withConstraint(t)}),i},withContext:function(t){return this.context=t,this},withDebounce:function(n,i){if(t.isNaN(n))throw"Milliseconds must be a number";var s=this.callback;return this.callback=t.debounce(s,n,!!i),this},withDelay:function(n){if(t.isNaN(n))throw"Milliseconds must be a number";var i=this,s=this.callback;return this.callback=function(t,c){setTimeout(function(){s.call(i.context,t,c)},n)},this},withThrottle:function(n){if(t.isNaN(n))throw"Milliseconds must be a number";var i=this.callback;return this.callback=t.throttle(i,n),this},subscribe:function(t){return this.callback=t,this}};var o={cache:{},regex:{},compare:function(n,i){var s,c,e,r=this.cache[i]&&this.cache[i][n];return r!==undefined?r:((c=this.regex[n])||(s="^"+t.map(n.split("."),function(t){var n="";return e&&(n="#"!==e?"\\.\\b":"\\b"),n+="#"===t?"[\\s\\S]*":"*"===t?"[^.]+":t,e=t,n}).join("")+"$",c=this.regex[n]=RegExp(s)),this.cache[i]=this.cache[i]||{},this.cache[i][n]=r=c.test(i),r)},reset:function(){this.cache={},this.regex={}}},a=function(n,s){!n.inactive&&i.configuration.resolver.compare(n.topic,s.topic)&&t.all(n.constraints,function(t){return t.call(n.context,s.data,s)})&&"function"==typeof n.callback&&n.callback.call(n.context,s.data,s)},u=0,h=[],l=function(){for(;h.length;)h.shift().unsubscribe()},f={addWireTap:function(t){var n=this;return n.wireTaps.push(t),function(){var i=n.wireTaps.indexOf(t);-1!==i&&n.wireTaps.splice(i,1)}},publish:function(n){return++u,n.timeStamp=new Date,t.each(this.wireTaps,function(t){t(n.data,n)}),this.subscriptions[n.channel]&&t.each(this.subscriptions[n.channel],function(t){for(var i,s=0,c=t.length;c>s;)(i=t[s++])&&a(i,n)}),0===--u&&l(),n},reset:function(){this.subscriptions&&(t.each(this.subscriptions,function(n){t.each(n,function(t){for(;t.length;)t.pop().unsubscribe()})}),this.subscriptions={})},subscribe:function(t){var n,i=this.subscriptions[t.channel];return i||(i=this.subscriptions[t.channel]={}),n=this.subscriptions[t.channel][t.topic],n||(n=this.subscriptions[t.channel][t.topic]=[]),n.push(t),t},subscriptions:{},wireTaps:[],unsubscribe:function(t){if(u)return h.push(t),undefined;if(this.subscriptions[t.channel][t.topic])for(var n=this.subscriptions[t.channel][t.topic].length,i=0;n>i;){if(this.subscriptions[t.channel][t.topic][i]===t){this.subscriptions[t.channel][t.topic].splice(i,1);break}i+=1}}};if(i={configuration:{bus:f,resolver:o,DEFAULT_CHANNEL:"/",SYSTEM_CHANNEL:"postal"},ChannelDefinition:e,SubscriptionDefinition:r,channel:function(t){return new e(t)},subscribe:function(t){return new r(t.channel||i.configuration.DEFAULT_CHANNEL,t.topic,t.callback)},publish:function(t){return t.channel=t.channel||i.configuration.DEFAULT_CHANNEL,i.configuration.bus.publish(t)},addWireTap:function(t){return this.configuration.bus.addWireTap(t)},linkChannels:function(n,s){var c=[];return n=t.isArray(n)?n:[n],s=t.isArray(s)?s:[s],t.each(n,function(n){var e=n.topic||"#";t.each(s,function(s){var r=s.channel||i.configuration.DEFAULT_CHANNEL;c.push(i.subscribe({channel:n.channel||i.configuration.DEFAULT_CHANNEL,topic:e,callback:function(n,c){var e=t.clone(c);e.topic=t.isFunction(s.topic)?s.topic(c.topic):s.topic||c.topic,e.channel=r,e.data=n,i.publish(e)}}))})}),c},utils:{getSubscribersFor:function(){var t=arguments[0],n=arguments[1];return 1===arguments.length&&(t=arguments[0].channel||i.configuration.DEFAULT_CHANNEL,n=arguments[0].topic),i.configuration.bus.subscriptions[t]&&Object.prototype.hasOwnProperty.call(i.configuration.bus.subscriptions[t],n)?i.configuration.bus.subscriptions[t][n]:[]},reset:function(){i.configuration.bus.reset(),i.configuration.resolver.reset()}}},f.subscriptions[i.configuration.SYSTEM_CHANNEL]={},n.hasOwnProperty("__postalReady__")&&t.isArray(n.__postalReady__))for(;n.__postalReady__.length;)n.__postalReady__.shift().onReady(i);return i}); |
{ | ||
"name" : "postal", | ||
"description" : "Pub/Sub library providing wildcard subscriptions, complex message handling, etc. Works server and client-side.", | ||
"version" : "0.8.7", | ||
"version" : "0.8.8", | ||
"homepage" : "http://github.com/postaljs/postal.js", | ||
@@ -46,2 +46,6 @@ "repository" : { | ||
"url" : "http://hebbut.net/" | ||
}, | ||
{ | ||
"name" : "Christian Haas", | ||
"url" : "http://github.com/dertseha" | ||
} | ||
@@ -48,0 +52,0 @@ ], |
# Postal.js | ||
## Version 0.8.7 (Dual Licensed [MIT](http://www.opensource.org/licenses/mit-license) & [GPL](http://www.opensource.org/licenses/gpl-license)) | ||
## Version 0.8.8 (Dual Licensed [MIT](http://www.opensource.org/licenses/mit-license) & [GPL](http://www.opensource.org/licenses/gpl-license)) | ||
@@ -5,0 +5,0 @@ ## What is it? |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
0
52489
8
416