Socket
Socket
Sign inDemoInstall

contra

Package Overview
Dependencies
0
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.6.10 to 1.7.0

2

bower.json
{
"name": "contra",
"description": "Asynchronous flow control with a functional taste to it",
"version": "1.6.10",
"version": "1.7.0",
"homepage": "https://github.com/bevacqua/contra",

@@ -6,0 +6,0 @@ "author": {

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

# 1.7.0 Heaven
- Fixed a bug where `done` callbacks weren't optional
# 1.6.9 Context Emission Revisited

@@ -2,0 +6,0 @@

/**
* contra - Asynchronous flow control with a functional taste to it
* @version v1.6.10
* @version v1.7.0
* @link https://github.com/bevacqua/contra

@@ -69,3 +69,3 @@ * @license MIT

function _concurrent (tasks, concurrency, done) {
if (!done) { done = concurrency; concurrency = CONCURRENT; }
if (typeof concurrency === 'function') { done = concurrency; concurrency = CONCURRENT; }
var d = once(done);

@@ -108,3 +108,3 @@ var q = _queue(worker, concurrency);

});
_concurrent(tasks, cap || concurrency, then ? then(collection, done) : done);
_concurrent(tasks, cap || concurrency, then ? then(collection, once(done)) : done);
};

@@ -111,0 +111,0 @@ if (!attached) { map.series = _map(SERIAL, then, true); }

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

// contra@v1.6.10, MIT licensed. https://github.com/bevacqua/contra
!function(n,t,r){"use strict";function e(){}function u(t){return"[object Array]"===n.prototype.toString.call(t)}function i(n,t){return Array.prototype.slice.call(n,t)}function o(n,t,r){n&&y(function(){n.apply(r||null,t||[])})}function f(n){function t(){r||(r=!0,(n||e).apply(null,arguments))}var r;return t.discard=function(){r=!0},t}function c(n,t,r){var e=n.shift();return e?(r&&r.discard(),o(t,[e]),!0):void 0}function a(){var n=i(arguments),t=n.shift();return function(){var r=i(arguments);t.apply(t,n.concat(r))}}function s(n,t){function r(){var t=i(arguments),u=n.shift();if(u){if(c(t,e))return;t.push(f(r)),o(u,t)}else o(e,arguments)}var e=f(t);r()}function l(t,r,e){function a(n,r){function e(){var t=i(arguments);c(t,s)||(h[n]=t.shift(),r())}o(t[n],[e])}e||(e=r,r=x);var s=f(e),l=g(a,r),p=n.keys(t),h=u(t)?[]:{};l.unshift(p),l.on("drain",function(){s(null,h)})}function p(n,t){l(n,k,t)}function h(t,r,e){var i=function(e,i,o,f){var c=arguments;2===c.length&&(o=i,i=x),3===c.length&&"number"!=typeof i&&(f=o,o=i,i=x);var a=n.keys(e),s=u(e)?[]:{};a.forEach(function(n){s[n]=function(t){3===o.length?o(e[n],n,t):o(e[n],t)}}),l(s,t||i,r?r(e,f):f)};return e||(i.series=h(k,r,!0)),i}function d(n){function t(n,t){return function(n){t(n)}}return h(n,t)}function v(t){function r(t,r){return function(e,i){function o(n,t){return!!i[t]}function f(){var r={};return n.keys(t).forEach(function(n){o(null,n)&&(r[n]=t[n])}),r}return e?void r(e):void r(null,u(i)?t.filter(o):f())}}return h(t,r)}function m(n,t){var e=t||{},u={};return n===r&&(n={}),n.on=function(t,r){return u[t]?u[t].push(r):u[t]=[r],n},n.once=function(t,r){return r._once=!0,n.on(t,r),n},n.off=function(t,r){var e=arguments.length;if(1===e)delete u[t];else if(0===e)u={};else{var i=u[t];if(!i)return n;i.splice(i.indexOf(r),1)}return n},n.emit=function(){var t=this,r=i(arguments),f=r.shift(),c=u[f];if("error"===f&&e.throws!==!1&&!c)throw 1===r.length?r[0]:r;return c?(u[f]=c.filter(function(n){return e.async?o(n,r,t):n.apply(t,r),!n._once}),n):n},n}function g(t,r){function e(n,t,r){var e=u(t)?t:[t];e.forEach(function(t){l[n]({t:t,done:r})}),o(c)}function c(){if(!(s||p>=h)){if(!l.length)return void(0===p&&d.emit("drain"));p++;var n=l.pop();t(n.t,f(a.bind(null,n))),o(c)}}function a(n){p--,o(n.done,i(arguments,1)),o(c)}var s,l=[],p=0,h=r||1,d=m({push:e.bind(null,"push"),unshift:e.bind(null,"unshift"),pause:function(){s=!0},resume:function(){s=!1,o(c)},pending:l});return n.defineProperty&&!n.definePropertyPartial&&n.defineProperty(d,"length",{get:function(){return l.length}}),d}var y,b=""+r,k=1,x=1/0,P="function"==typeof setImmediate;y=P?function(n){setImmediate(n)}:typeof process!==b&&process.nextTick?process.nextTick:function(n){setTimeout(n,0)};var w={curry:a,concurrent:l,series:p,waterfall:s,each:d(),map:h(),filter:v(),queue:g,emitter:m};typeof module!==b&&module.exports?module.exports=w:t.contra=w}(Object,this);
// contra@v1.7.0, MIT licensed. https://github.com/bevacqua/contra
!function(n,t,r){"use strict";function e(){}function u(t){return"[object Array]"===n.prototype.toString.call(t)}function i(n,t){return Array.prototype.slice.call(n,t)}function o(n,t,r){n&&y(function(){n.apply(r||null,t||[])})}function f(n){function t(){r||(r=!0,(n||e).apply(null,arguments))}var r;return t.discard=function(){r=!0},t}function c(n,t,r){var e=n.shift();return e?(r&&r.discard(),o(t,[e]),!0):void 0}function a(){var n=i(arguments),t=n.shift();return function(){var r=i(arguments);t.apply(t,n.concat(r))}}function s(n,t){function r(){var t=i(arguments),u=n.shift();if(u){if(c(t,e))return;t.push(f(r)),o(u,t)}else o(e,arguments)}var e=f(t);r()}function l(t,r,e){function a(n,r){function e(){var t=i(arguments);c(t,s)||(h[n]=t.shift(),r())}o(t[n],[e])}"function"==typeof r&&(e=r,r=x);var s=f(e),l=g(a,r),p=n.keys(t),h=u(t)?[]:{};l.unshift(p),l.on("drain",function(){s(null,h)})}function p(n,t){l(n,k,t)}function h(t,r,e){var i=function(e,i,o,c){var a=arguments;2===a.length&&(o=i,i=x),3===a.length&&"number"!=typeof i&&(c=o,o=i,i=x);var s=n.keys(e),p=u(e)?[]:{};s.forEach(function(n){p[n]=function(t){3===o.length?o(e[n],n,t):o(e[n],t)}}),l(p,t||i,r?r(e,f(c)):c)};return e||(i.series=h(k,r,!0)),i}function d(n){function t(n,t){return function(n){t(n)}}return h(n,t)}function v(t){function r(t,r){return function(e,i){function o(n,t){return!!i[t]}function f(){var r={};return n.keys(t).forEach(function(n){o(null,n)&&(r[n]=t[n])}),r}return e?void r(e):void r(null,u(i)?t.filter(o):f())}}return h(t,r)}function m(n,t){var e=t||{},u={};return n===r&&(n={}),n.on=function(t,r){return u[t]?u[t].push(r):u[t]=[r],n},n.once=function(t,r){return r._once=!0,n.on(t,r),n},n.off=function(t,r){var e=arguments.length;if(1===e)delete u[t];else if(0===e)u={};else{var i=u[t];if(!i)return n;i.splice(i.indexOf(r),1)}return n},n.emit=function(){var t=this,r=i(arguments),f=r.shift(),c=u[f];if("error"===f&&e.throws!==!1&&!c)throw 1===r.length?r[0]:r;return c?(u[f]=c.filter(function(n){return e.async?o(n,r,t):n.apply(t,r),!n._once}),n):n},n}function g(t,r){function e(n,t,r){var e=u(t)?t:[t];e.forEach(function(t){l[n]({t:t,done:r})}),o(c)}function c(){if(!(s||p>=h)){if(!l.length)return void(0===p&&d.emit("drain"));p++;var n=l.pop();t(n.t,f(a.bind(null,n))),o(c)}}function a(n){p--,o(n.done,i(arguments,1)),o(c)}var s,l=[],p=0,h=r||1,d=m({push:e.bind(null,"push"),unshift:e.bind(null,"unshift"),pause:function(){s=!0},resume:function(){s=!1,o(c)},pending:l});return n.defineProperty&&!n.definePropertyPartial&&n.defineProperty(d,"length",{get:function(){return l.length}}),d}var y,b=""+r,k=1,x=1/0,P="function"==typeof setImmediate;y=P?function(n){setImmediate(n)}:typeof process!==b&&process.nextTick?process.nextTick:function(n){setTimeout(n,0)};var w={curry:a,concurrent:l,series:p,waterfall:s,each:d(),map:h(),filter:v(),queue:g,emitter:m};typeof module!==b&&module.exports?module.exports=w:t.contra=w}(Object,this);
/**
* contra - Asynchronous flow control with a functional taste to it
* @version v1.6.10
* @version v1.7.0
* @link https://github.com/bevacqua/contra

@@ -5,0 +5,0 @@ * @license MIT

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

// contra@v1.6.10, MIT licensed. https://github.com/bevacqua/contra
// contra@v1.7.0, MIT licensed. https://github.com/bevacqua/contra
!function(t,r){"use strict";if(r.prototype.forEach||(r.prototype.forEach=function(t,r){if(void 0===this||null===this||"function"!=typeof t)throw new TypeError;for(var o=this,n=o.length,e=0;n>e;e++)e in o&&t.call(r,o[e],e,o)}),r.prototype.indexOf||(r.prototype.indexOf=function(t,r){if(void 0===this||null===this)throw new TypeError;var o=this.length;for(r=+r||0,1/0===Math.abs(r)?r=0:0>r&&(r+=o,0>r&&(r=0));o>r;r++)if(this[r]===t)return r;return-1}),r.prototype.filter||(r.prototype.filter=function(t,r){var o=[];return this.forEach(function(n,e,i){t.call(r,n,e,i)&&o.push(n)},r),o}),Function.prototype.bind||(Function.prototype.bind=function(t){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var o=r.prototype.slice.call(arguments,1),n=this,e=function(){},i=function(){var i=this instanceof e&&t?this:t,p=o.concat(r.prototype.slice.call(arguments));return n.apply(i,p)};return e.prototype=this.prototype,i.prototype=new e,i}),t.keys||(t.keys=function(t){var r=[];for(var o in t)t.hasOwnProperty(o)&&r.push(o);return r}),t.defineProperty)try{t.defineProperty({},"x",{})}catch(o){t.definePropertyPartial=!0}}(Object,Array);
{
"name": "contra",
"description": "Asynchronous flow control with a functional taste to it",
"version": "1.6.10",
"version": "1.7.0",
"homepage": "https://github.com/bevacqua/contra",

@@ -6,0 +6,0 @@ "author": {

@@ -63,3 +63,3 @@ (function (Object, root, undefined) {

function _concurrent (tasks, concurrency, done) {
if (!done) { done = concurrency; concurrency = CONCURRENT; }
if (typeof concurrency === 'function') { done = concurrency; concurrency = CONCURRENT; }
var d = once(done);

@@ -102,3 +102,3 @@ var q = _queue(worker, concurrency);

});
_concurrent(tasks, cap || concurrency, then ? then(collection, done) : done);
_concurrent(tasks, cap || concurrency, then ? then(collection, once(done)) : done);
};

@@ -105,0 +105,0 @@ if (!attached) { map.series = _map(SERIAL, then, true); }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc