Comparing version 0.12.4 to 1.0.0
/** | ||
* postal - Pub/Sub library providing wildcard subscriptions, complex message handling, etc. Works server and client-side. | ||
* Author: Jim Cowart (http://ifandelse.com) | ||
* Version: v0.12.4 | ||
* Version: v1.0.0 | ||
* Url: http://github.com/postaljs/postal.js | ||
@@ -81,3 +81,3 @@ * License(s): MIT | ||
var eq = false; | ||
if (_.isString(data)) { | ||
if (typeof data == 'string') { | ||
eq = data === previous; | ||
@@ -87,3 +87,3 @@ previous = data; | ||
eq = _.isEqual(data, previous); | ||
previous = _.clone(data); | ||
previous = _.extend({}, data); | ||
} | ||
@@ -97,7 +97,3 @@ return !eq; | ||
var isDistinct = !_.any(previous, function (p) { | ||
if (_.isObject(data) || _.isArray(data)) { | ||
return _.isEqual(data, p); | ||
} else { | ||
return data === p; | ||
} | ||
return _.isEqual(data, p); | ||
}); | ||
@@ -127,3 +123,3 @@ if (isDistinct) { | ||
disposeAfter: function disposeAfter(maxCalls) { | ||
if (!_.isNumber(maxCalls) || maxCalls <= 0) { | ||
if (typeof maxCalls != 'number' || maxCalls <= 0) { | ||
throw new Error("The value provided to disposeAfter (maxCalls) must be a number greater than zero."); | ||
@@ -199,3 +195,3 @@ } | ||
constraint: function constraint(predicate) { | ||
if (!_.isFunction(predicate)) { | ||
if (typeof predicate != 'function') { | ||
throw new Error("Predicate constraint must be a function"); | ||
@@ -212,7 +208,5 @@ } | ||
var self = this; /* istanbul ignore else */ | ||
if (_.isArray(predicates)) { | ||
_.each(predicates, function (predicate) { | ||
self.constraint(predicate); | ||
}); | ||
} | ||
_.each(predicates, function (predicate) { | ||
self.constraint(predicate); | ||
}); | ||
return self; | ||
@@ -225,3 +219,3 @@ }, | ||
debounce: function debounce(milliseconds, immediate) { | ||
if (!_.isNumber(milliseconds)) { | ||
if (typeof milliseconds != 'number') { | ||
throw new Error("Milliseconds must be a number"); | ||
@@ -236,3 +230,3 @@ } | ||
delay: function delay(milliseconds) { | ||
if (!_.isNumber(milliseconds)) { | ||
if (typeof milliseconds != 'number') { | ||
throw new Error("Milliseconds must be a number"); | ||
@@ -249,3 +243,3 @@ } | ||
throttle: function throttle(milliseconds) { | ||
if (!_.isNumber(milliseconds)) { | ||
if (typeof milliseconds != 'number') { | ||
throw new Error("Milliseconds must be a number"); | ||
@@ -576,3 +570,3 @@ } | ||
delete channelSubs[subDef.topic]; | ||
if (_.isEmpty(channelSubs)) { | ||
if (!_.keys(channelSubs).length) { | ||
delete this.subscriptions[subDef.channel]; | ||
@@ -579,0 +573,0 @@ } |
/** | ||
* postal - Pub/Sub library providing wildcard subscriptions, complex message handling, etc. Works server and client-side. | ||
* Author: Jim Cowart (http://ifandelse.com) | ||
* Version: v0.12.4 | ||
* Version: v1.0.0 | ||
* Url: http://github.com/postaljs/postal.js | ||
* License(s): MIT | ||
*/ | ||
(function(e,t){"function"==typeof define&&define.amd?define(["lodash"],function(n){return t(n,e)}):"object"==typeof module&&module.exports?module.exports=t(require("lodash"),this):e.postal=t(e._,e)})(this,function(e,t,n){function i(e,t){return function(){if(console.warn||console.log){var n="Warning, the "+e+" method has been deprecated. Please use "+t+" instead.";console.warn?console.warn(n):console.log(n)}return b.prototype[t].apply(this,arguments)}}function r(){for(;E.length;)l.unsubscribe(E.shift())}function c(e,t,n){return function(i,r,c){i===e&&c.splice(r,1),0===c.length&&delete n[t]}}function s(e,t,n,i,r){var c=r&&r.headers||{};return function(r){p.resolver.compare(r.topic,e,c)&&(t.push(r),r.cacheKeys.push(n),i&&i(r))}}function o(e,t){return{channel:p.SYSTEM_CHANNEL,topic:"subscription."+e,data:{event:"subscription."+e,channel:t.channel,topic:t.topic}}}function a(t,n){return"function"==typeof t?t:t?function(i){var r=0,c=0;return e.each(t,function(e,s){r+=1,("topic"===s&&n.compare(i.topic,t.topic,{resolverNoCache:!0})||"context"===s&&t.context===i._context||i[s]===t[s])&&(c+=1)}),r===c}:function(){return!0}}var u=t.postal,h={DEFAULT_CHANNEL:"/",SYSTEM_CHANNEL:"postal",enableSystemMessages:!0,cacheKeyDelimiter:"|",autoCompactResolver:!1},l={configuration:e.extend({},h)},p=l.configuration,f=function(e,t){this.bus=t,this.channel=e||p.DEFAULT_CHANNEL};f.prototype.subscribe=function(){return this.bus.subscribe({channel:this.channel,topic:1===arguments.length?arguments[0].topic:arguments[0],callback:1===arguments.length?arguments[0].callback:arguments[1]})},f.prototype.publish=function(){var e,t={};"string"==typeof arguments[0]?(t.topic=arguments[0],t.data=arguments[1],e=arguments[2]):(t=arguments[0],e=arguments[1]),t.channel=this.channel,this.bus.publish(t,e)};var b=function(e,t,i){if(3!==arguments.length)throw new Error("You must provide a channel, topic and callback when creating a SubscriptionDefinition instance.");if(0===t.length)throw new Error("Topics cannot be empty");this.channel=e,this.topic=t,this.callback=i,this.pipeline=[],this.cacheKeys=[],this._context=n},d=function(){var t;return function(n){var i=!1;return e.isString(n)?(i=n===t,t=n):(i=e.isEqual(n,t),t=e.clone(n)),!i}},m=function(){var t=[];return function(n){var i=!e.any(t,function(t){return e.isObject(n)||e.isArray(n)?e.isEqual(n,t):n===t});return i&&t.push(n),i}};b.prototype={"catch":function(e){var t=this.callback,n=function(){try{t.apply(this,arguments)}catch(n){e(n,arguments[0])}};return this.callback=n,this},defer:function(){return this.delay(0)},disposeAfter:function(t){if(!e.isNumber(t)||0>=t)throw new Error("The value provided to disposeAfter (maxCalls) must be a number greater than zero.");var n=this,i=e.after(t,e.bind(function(){n.unsubscribe()}));return n.pipeline.push(function(e,t,n){n(e,t),i()}),n},distinct:function(){return this.constraint(new m)},distinctUntilChanged:function(){return this.constraint(new d)},invokeSubscriber:function(e,t){if(!this.inactive){var n=this,i=n.pipeline,r=i.length,c=n._context,s=-1,o=!1;if(r){i=i.concat([n.callback]);var a=function u(e,t){s+=1,r>s?i[s].call(c,e,t,u):(n.callback.call(c,e,t),o=!0)};a(e,t,0)}else n.callback.call(c,e,t),o=!0;return o}},logError:function(){if(console){var e;e=console.warn?console.warn:console.log,this["catch"](e)}return this},once:function(){return this.disposeAfter(1)},subscribe:function(e){return this.callback=e,this},unsubscribe:function(){this.inactive||l.unsubscribe(this)},constraint:function(t){if(!e.isFunction(t))throw new Error("Predicate constraint must be a function");return this.pipeline.push(function(e,n,i){t.call(this,e,n)&&i(e,n)}),this},constraints:function(t){var n=this;return e.isArray(t)&&e.each(t,function(e){n.constraint(e)}),n},context:function(e){return this._context=e,this},debounce:function(t,n){if(!e.isNumber(t))throw new Error("Milliseconds must be a number");return this.pipeline.push(e.debounce(function(e,t,n){n(e,t)},t,!!n)),this},delay:function(t){if(!e.isNumber(t))throw new Error("Milliseconds must be a number");var n=this;return n.pipeline.push(function(e,n,i){setTimeout(function(){i(e,n)},t)}),this},throttle:function(t){if(!e.isNumber(t))throw new Error("Milliseconds must be a number");var n=function(e,t,n){n(e,t)};return this.pipeline.push(e.throttle(n,t)),this}};for(var v=["withConstraint","withConstraints","withContext","withDebounce","withDelay","withThrottle"],g=["constraint","constraints","context","debounce","delay","throttle"],y=0;6>y;y++){var w=v[y];b.prototype[w]=i(w,g[y])}var _=(p.resolver={cache:{},regex:{},enableCache:!0,compare:function(t,n,i){var r,c,s,o=n+p.cacheKeyDelimiter+t,a=this.cache[o],u=i||{},h=this.enableCache&&!u.resolverNoCache;return a===!0?a:-1===t.indexOf("#")&&-1===t.indexOf("*")?(a=n===t,h&&(this.cache[o]=a),a):((c=this.regex[t])||(r="^"+e.map(t.split("."),function(e){var t="";return s&&(t="#"!==s?"\\.\\b":"\\b"),t+="#"===e?"[\\s\\S]*":"*"===e?"[^.]+":e,s=e,t}).join("")+"$",c=this.regex[t]=new RegExp(r)),a=c.test(n),h&&(this.cache[o]=a),a)},reset:function(){this.cache={},this.regex={}},purge:function(t){var n=this,i=p.cacheKeyDelimiter,r=function(e,r){var c=r.split(i),s=c[0],o=c[1];"undefined"!=typeof t.topic&&t.topic!==s||"undefined"!=typeof t.binding&&t.binding!==o||delete n.cache[r]},c=function(e,t){var r=t.split(i);0===l.getSubscribersFor({topic:r[0]}).length&&delete n.cache[t]};if("undefined"==typeof t)this.reset();else{var s=t.compact===!0?c:r;e.each(this.cache,s)}}},0),E=[],x=0,C=e.bind(o,this,"created"),N=e.bind(o,this,"removed");if(e.extend(l,{cache:{},subscriptions:{},wireTaps:[],ChannelDefinition:f,SubscriptionDefinition:b,channel:function(e){return new f(e,this)},addWireTap:function(e){var t=this;return t.wireTaps.push(e),function(){var n=t.wireTaps.indexOf(e);-1!==n&&t.wireTaps.splice(n,1)}},noConflict:function(){if("undefined"==typeof window||"undefined"!=typeof window&&"function"==typeof define&&define.amd)throw new Error("noConflict can only be used in browser clients which aren't using AMD modules");return t.postal=u,this},getSubscribersFor:function(t){var n=[],i=this;return e.each(i.subscriptions,function(i){e.each(i,function(i){n=n.concat(e.filter(i,a(t,p.resolver)))})}),n},publish:function(t,n){++_;var i=t.channel=t.channel||p.DEFAULT_CHANNEL,c=t.topic;t.timeStamp=new Date,this.wireTaps.length&&e.each(this.wireTaps,function(e){e(t.data,t,_)});var o=i+p.cacheKeyDelimiter+c,a=this.cache[o],u=0,h=0;if(a)e.each(a,function(e){e.invokeSubscriber(t.data,t)?h++:u++});else{a=this.cache[o]=[];var l=s(c,a,o,function(e){e.invokeSubscriber(t.data,t)?h++:u++},t);e.each(this.subscriptions[i],function(t){e.each(t,l)})}0===--_&&r(),n&&n({activated:h,skipped:u})},reset:function(){this.unsubscribeFor(),p.resolver.reset(),this.subscriptions={}},subscribe:function(t){var n,i=this.subscriptions,r=new b(t.channel||p.DEFAULT_CHANNEL,t.topic,t.callback),c=i[r.channel],o=r.channel.length;return c||(c=i[r.channel]={}),n=i[r.channel][r.topic],n||(n=i[r.channel][r.topic]=[]),n.push(r),e.each(this.cache,function(e,t){t.substr(0,o)===r.channel&&s(t.split(p.cacheKeyDelimiter)[1],e,t)(r)}),p.enableSystemMessages&&this.publish(C(r)),r},unsubscribe:function(){for(var t,n,i,r,s=arguments.length,o=0;s>o;o++){if(t=arguments[o],t.inactive=!0,_)return E.push(t),void 0;if(n=this.subscriptions[t.channel],i=n&&n[t.topic]){var a=i.length;for(r=0;a>r;){if(i[r]===t){i.splice(r,1);break}r+=1}if(0===i.length&&(delete n[t.topic],e.isEmpty(n)&&delete this.subscriptions[t.channel]),t.cacheKeys&&t.cacheKeys.length)for(var u;u=t.cacheKeys.pop();)e.each(this.cache[u],c(t,u,this.cache));if("function"==typeof p.resolver.purge){var h=p.autoCompactResolver===!0?0:"number"==typeof p.autoCompactResolver?p.autoCompactResolver-1:!1;h>=0&&x===h?(p.resolver.purge({compact:!0}),x=0):h>=0&&h>x&&(x+=1)}}p.enableSystemMessages&&this.publish(N(t))}},unsubscribeFor:function(e){var t=[];this.subscriptions&&(t=this.getSubscribersFor(e),this.unsubscribe.apply(this,t))}}),t&&Object.prototype.hasOwnProperty.call(t,"__postalReady__")&&e.isArray(t.__postalReady__))for(;t.__postalReady__.length;)t.__postalReady__.shift().onReady(l);return l}); | ||
(function(e,t){"function"==typeof define&&define.amd?define(["lodash"],function(n){return t(n,e)}):"object"==typeof module&&module.exports?module.exports=t(require("lodash"),this):e.postal=t(e._,e)})(this,function(e,t,n){function i(e,t){return function(){if(console.warn||console.log){var n="Warning, the "+e+" method has been deprecated. Please use "+t+" instead.";console.warn?console.warn(n):console.log(n)}return b.prototype[t].apply(this,arguments)}}function r(){for(;E.length;)l.unsubscribe(E.shift())}function c(e,t,n){return function(i,r,c){i===e&&c.splice(r,1),0===c.length&&delete n[t]}}function s(e,t,n,i,r){var c=r&&r.headers||{};return function(r){f.resolver.compare(r.topic,e,c)&&(t.push(r),r.cacheKeys.push(n),i&&i(r))}}function o(e,t){return{channel:f.SYSTEM_CHANNEL,topic:"subscription."+e,data:{event:"subscription."+e,channel:t.channel,topic:t.topic}}}function a(t,n){return"function"==typeof t?t:t?function(i){var r=0,c=0;return e.each(t,function(e,s){r+=1,("topic"===s&&n.compare(i.topic,t.topic,{resolverNoCache:!0})||"context"===s&&t.context===i._context||i[s]===t[s])&&(c+=1)}),r===c}:function(){return!0}}var u=t.postal,h={DEFAULT_CHANNEL:"/",SYSTEM_CHANNEL:"postal",enableSystemMessages:!0,cacheKeyDelimiter:"|",autoCompactResolver:!1},l={configuration:e.extend({},h)},f=l.configuration,p=function(e,t){this.bus=t,this.channel=e||f.DEFAULT_CHANNEL};p.prototype.subscribe=function(){return this.bus.subscribe({channel:this.channel,topic:1===arguments.length?arguments[0].topic:arguments[0],callback:1===arguments.length?arguments[0].callback:arguments[1]})},p.prototype.publish=function(){var e,t={};"string"==typeof arguments[0]?(t.topic=arguments[0],t.data=arguments[1],e=arguments[2]):(t=arguments[0],e=arguments[1]),t.channel=this.channel,this.bus.publish(t,e)};var b=function(e,t,i){if(3!==arguments.length)throw new Error("You must provide a channel, topic and callback when creating a SubscriptionDefinition instance.");if(0===t.length)throw new Error("Topics cannot be empty");this.channel=e,this.topic=t,this.callback=i,this.pipeline=[],this.cacheKeys=[],this._context=n},d=function(){var t;return function(n){var i=!1;return"string"==typeof n?(i=n===t,t=n):(i=e.isEqual(n,t),t=e.extend({},n)),!i}},m=function(){var t=[];return function(n){var i=!e.any(t,function(t){return e.isEqual(n,t)});return i&&t.push(n),i}};b.prototype={"catch":function(e){var t=this.callback,n=function(){try{t.apply(this,arguments)}catch(n){e(n,arguments[0])}};return this.callback=n,this},defer:function(){return this.delay(0)},disposeAfter:function(t){if("number"!=typeof t||0>=t)throw new Error("The value provided to disposeAfter (maxCalls) must be a number greater than zero.");var n=this,i=e.after(t,e.bind(function(){n.unsubscribe()}));return n.pipeline.push(function(e,t,n){n(e,t),i()}),n},distinct:function(){return this.constraint(new m)},distinctUntilChanged:function(){return this.constraint(new d)},invokeSubscriber:function(e,t){if(!this.inactive){var n=this,i=n.pipeline,r=i.length,c=n._context,s=-1,o=!1;if(r){i=i.concat([n.callback]);var a=function u(e,t){s+=1,r>s?i[s].call(c,e,t,u):(n.callback.call(c,e,t),o=!0)};a(e,t,0)}else n.callback.call(c,e,t),o=!0;return o}},logError:function(){if(console){var e;e=console.warn?console.warn:console.log,this["catch"](e)}return this},once:function(){return this.disposeAfter(1)},subscribe:function(e){return this.callback=e,this},unsubscribe:function(){this.inactive||l.unsubscribe(this)},constraint:function(e){if("function"!=typeof e)throw new Error("Predicate constraint must be a function");return this.pipeline.push(function(t,n,i){e.call(this,t,n)&&i(t,n)}),this},constraints:function(t){var n=this;return e.each(t,function(e){n.constraint(e)}),n},context:function(e){return this._context=e,this},debounce:function(t,n){if("number"!=typeof t)throw new Error("Milliseconds must be a number");return this.pipeline.push(e.debounce(function(e,t,n){n(e,t)},t,!!n)),this},delay:function(e){if("number"!=typeof e)throw new Error("Milliseconds must be a number");var t=this;return t.pipeline.push(function(t,n,i){setTimeout(function(){i(t,n)},e)}),this},throttle:function(t){if("number"!=typeof t)throw new Error("Milliseconds must be a number");var n=function(e,t,n){n(e,t)};return this.pipeline.push(e.throttle(n,t)),this}};for(var v=["withConstraint","withConstraints","withContext","withDebounce","withDelay","withThrottle"],g=["constraint","constraints","context","debounce","delay","throttle"],y=0;6>y;y++){var w=v[y];b.prototype[w]=i(w,g[y])}var _=(f.resolver={cache:{},regex:{},enableCache:!0,compare:function(t,n,i){var r,c,s,o=n+f.cacheKeyDelimiter+t,a=this.cache[o],u=i||{},h=this.enableCache&&!u.resolverNoCache;return a===!0?a:-1===t.indexOf("#")&&-1===t.indexOf("*")?(a=n===t,h&&(this.cache[o]=a),a):((c=this.regex[t])||(r="^"+e.map(t.split("."),function(e){var t="";return s&&(t="#"!==s?"\\.\\b":"\\b"),t+="#"===e?"[\\s\\S]*":"*"===e?"[^.]+":e,s=e,t}).join("")+"$",c=this.regex[t]=new RegExp(r)),a=c.test(n),h&&(this.cache[o]=a),a)},reset:function(){this.cache={},this.regex={}},purge:function(t){var n=this,i=f.cacheKeyDelimiter,r=function(e,r){var c=r.split(i),s=c[0],o=c[1];"undefined"!=typeof t.topic&&t.topic!==s||"undefined"!=typeof t.binding&&t.binding!==o||delete n.cache[r]},c=function(e,t){var r=t.split(i);0===l.getSubscribersFor({topic:r[0]}).length&&delete n.cache[t]};if("undefined"==typeof t)this.reset();else{var s=t.compact===!0?c:r;e.each(this.cache,s)}}},0),E=[],x=0,C=e.bind(o,this,"created"),k=e.bind(o,this,"removed");if(e.extend(l,{cache:{},subscriptions:{},wireTaps:[],ChannelDefinition:p,SubscriptionDefinition:b,channel:function(e){return new p(e,this)},addWireTap:function(e){var t=this;return t.wireTaps.push(e),function(){var n=t.wireTaps.indexOf(e);-1!==n&&t.wireTaps.splice(n,1)}},noConflict:function(){if("undefined"==typeof window||"undefined"!=typeof window&&"function"==typeof define&&define.amd)throw new Error("noConflict can only be used in browser clients which aren't using AMD modules");return t.postal=u,this},getSubscribersFor:function(t){var n=[],i=this;return e.each(i.subscriptions,function(i){e.each(i,function(i){n=n.concat(e.filter(i,a(t,f.resolver)))})}),n},publish:function(t,n){++_;var i=t.channel=t.channel||f.DEFAULT_CHANNEL,c=t.topic;t.timeStamp=new Date,this.wireTaps.length&&e.each(this.wireTaps,function(e){e(t.data,t,_)});var o=i+f.cacheKeyDelimiter+c,a=this.cache[o],u=0,h=0;if(a)e.each(a,function(e){e.invokeSubscriber(t.data,t)?h++:u++});else{a=this.cache[o]=[];var l=s(c,a,o,function(e){e.invokeSubscriber(t.data,t)?h++:u++},t);e.each(this.subscriptions[i],function(t){e.each(t,l)})}0===--_&&r(),n&&n({activated:h,skipped:u})},reset:function(){this.unsubscribeFor(),f.resolver.reset(),this.subscriptions={}},subscribe:function(t){var n,i=this.subscriptions,r=new b(t.channel||f.DEFAULT_CHANNEL,t.topic,t.callback),c=i[r.channel],o=r.channel.length;return c||(c=i[r.channel]={}),n=i[r.channel][r.topic],n||(n=i[r.channel][r.topic]=[]),n.push(r),e.each(this.cache,function(e,t){t.substr(0,o)===r.channel&&s(t.split(f.cacheKeyDelimiter)[1],e,t)(r)}),f.enableSystemMessages&&this.publish(C(r)),r},unsubscribe:function(){for(var t,n,i,r,s=arguments.length,o=0;s>o;o++){if(t=arguments[o],t.inactive=!0,_)return E.push(t),void 0;if(n=this.subscriptions[t.channel],i=n&&n[t.topic]){var a=i.length;for(r=0;a>r;){if(i[r]===t){i.splice(r,1);break}r+=1}if(0===i.length&&(delete n[t.topic],e.keys(n).length||delete this.subscriptions[t.channel]),t.cacheKeys&&t.cacheKeys.length)for(var u;u=t.cacheKeys.pop();)e.each(this.cache[u],c(t,u,this.cache));if("function"==typeof f.resolver.purge){var h=f.autoCompactResolver===!0?0:"number"==typeof f.autoCompactResolver?f.autoCompactResolver-1:!1;h>=0&&x===h?(f.resolver.purge({compact:!0}),x=0):h>=0&&h>x&&(x+=1)}}f.enableSystemMessages&&this.publish(k(t))}},unsubscribeFor:function(e){var t=[];this.subscriptions&&(t=this.getSubscribersFor(e),this.unsubscribe.apply(this,t))}}),t&&Object.prototype.hasOwnProperty.call(t,"__postalReady__")&&e.isArray(t.__postalReady__))for(;t.__postalReady__.length;)t.__postalReady__.shift().onReady(l);return l}); |
{ | ||
"name": "postal", | ||
"description": "Pub/Sub library providing wildcard subscriptions, complex message handling, etc. Works server and client-side.", | ||
"version": "0.12.4", | ||
"version": "1.0.0", | ||
"homepage": "http://github.com/postaljs/postal.js", | ||
@@ -14,3 +14,2 @@ "repository": { | ||
"name": "Jim Cowart", | ||
"email": "WhyNotJustComment@OnMyBlog.com", | ||
"url": "http://ifandelse.com" | ||
@@ -20,3 +19,2 @@ }, | ||
"name": "Alex Robson", | ||
"email": "WhyNotJustComment@OnMyBlog.com", | ||
"url": "http://nerdventure.io" | ||
@@ -26,3 +24,2 @@ }, | ||
"name": "Nicholas Cloud", | ||
"email": "WhyNotJustComment@OnMyBlog.com", | ||
"url": "http://nicholascloud.com" | ||
@@ -32,3 +29,2 @@ }, | ||
"name": "Doug Neiner", | ||
"email": "WhyNotJustComment@OnMyBlog.com", | ||
"url": "http://dougneiner.com" | ||
@@ -38,3 +34,2 @@ }, | ||
"name": "Jonathan Creamer", | ||
"email": "WhyNotJustComment@OnMyBlog.com", | ||
"url": "http://freshbrewedcode.com/jonathancreamer" | ||
@@ -44,3 +39,2 @@ }, | ||
"name": "Elijah Manor", | ||
"email": "WhyNotJustComment@OnMyBlog.com", | ||
"url": "http://www.elijahmanor.com" | ||
@@ -50,3 +44,2 @@ }, | ||
"name": "Ger Hobbelt", | ||
"email": "ger@hobbelt.com", | ||
"url": "http://hebbut.net/" | ||
@@ -69,2 +62,6 @@ }, | ||
"url": "http://blog.anthonyvanderhoorn.com/" | ||
}, | ||
{ | ||
"name": "John-David Dalton", | ||
"url": "http://www.allyoucanleet.com" | ||
} | ||
@@ -96,3 +93,3 @@ ], | ||
"dependencies": { | ||
"lodash": "~2.4.1" | ||
"lodash": "~3.1.0" | ||
}, | ||
@@ -129,2 +126,3 @@ "devDependencies": { | ||
"test": "./node_modules/mocha/bin/mocha -r spec/helpers/node-setup.js spec", | ||
"test-lodash": "./node_modules/mocha/bin/mocha -r spec/helpers/node-lodash-build-setup.js spec", | ||
"coverage": "./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha -x 'spec/**/*' -- -r spec/helpers/node-setup.js spec spec/*.spec.js", | ||
@@ -131,0 +129,0 @@ "show-coverage": "open ./coverage/lcov-report/index.html", |
# Postal.js | ||
## Version 0.12.4 ([MIT](http://www.opensource.org/licenses/mit-license)) | ||
## Version 1.0.0 ([MIT](http://www.opensource.org/licenses/mit-license)) | ||
> See the [changelog](https://github.com/postaljs/postal.js/blob/master/changelog.md) for information on if the current version of postal has breaking changes compared to any older version(s) you might be using. Version 0.11+ removed the dependency on ConduitJS and significantly improved publishing performance. | ||
> See the [changelog](https://github.com/postaljs/postal.js/blob/master/changelog.md) for information on if the current version of postal has breaking changes compared to any older version(s) you might be using. Version 0.11+ removed the dependency on ConduitJS and significantly improved publishing performance. Version 1.0+ added an optional embedded-and-customized-lodash build. | ||
@@ -196,2 +196,6 @@ ## What is it? | ||
* postal depends on [lodash.js](http://lodash.com/) | ||
* The standard postal build output (`lib/postal.js`) is what you would normally use if you're already using lodash in your app. | ||
* The `lib/postal.lodash.js` build output might be of interest to you if these things are true: | ||
* You're using webpack, browserify or another bundler/loader capable of loading CommonJS modules. | ||
* You only need the specific bits of lodash used by postal and don't need the full lib. | ||
* postal uses [gulp.js](http://gulpjs.com/) for building, running tests and examples. | ||
@@ -203,3 +207,3 @@ * To build | ||
* To run tests & examples | ||
* Tests are node-based: `npm test` | ||
* Tests are node-based: `npm test` (or `npm run test-lodash` to test the custom lodash build output) | ||
* To run browser-based examples: | ||
@@ -206,0 +210,0 @@ * run `npm start` |
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
92849
8
1232
215
+ Addedlodash@3.1.0(transitive)
- Removedlodash@2.4.2(transitive)
Updatedlodash@~3.1.0