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.1 to 1.6.2

2

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

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

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

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

var λ = {
var contra = {
curry: _curry,

@@ -224,6 +224,6 @@ concurrent: _concurrent,

if (typeof module !== undef && module.exports) {
module.exports = λ;
module.exports = contra;
} else {
root.contra = λ;
root.contra = contra;
}
})(Object, this);

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

// contra@v1.6.1, MIT licensed. https://github.com/bevacqua/contra
// contra@v1.6.2, 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(n,t,r){function e(t,r){function e(){var n=i(arguments);c(n,a)||(p[t]=n.shift(),r())}o(n[t],[e])}r||(r=t,t=P);var a=f(r),s=g(e,t),l=k(n),p=u(n)?[]:{};s.unshift(l),s.on("drain",function(){a(null,p)})}function p(n,t){l(n,x,t)}function d(n,t,r){var e=function(r,e,i,o){var f=arguments;2===f.length&&(i=e,e=P),3===f.length&&"number"!=typeof e&&(o=i,i=e,e=P);var c=k(r),a=u(r)?[]:{};c.forEach(function(n){a[n]=function(t){3===i.length?i(r[n],n,t):i(r[n],t)}}),l(a,n||e,t?t(r,o):o)};return r||(e.series=d(x,t,!0)),e}function h(n){function t(n,t){return function(n){t(n)}}return d(n,t)}function v(n){function t(n,t){return function(r,e){function i(n,t){return!!e[t]}function o(){var t={};return k(n).forEach(function(r){i(null,r)&&(t[r]=n[r])}),t}return r?void t(r):void t(null,u(e)?n.filter(i):o())}}return d(n,t)}function m(n,t){var e=t||{},u={};return n===r&&(n={}),n.on=function(n,t){u[n]?u[n].push(t):u[n]=[t]},n.once=function(t,r){r._once=!0,n.on(t,r)},n.off=function(n,t){var r=u[n];r&&r.splice(r.indexOf(t),1)},n.emit=function(){var n=i(arguments),t=n.shift(),r=u[t];if("error"===t&&!r)throw 1===n.length?n[0]:n;r&&(u[t]=r.filter(function(t){return e.async?o(t,n):t.apply(null,n),!t._once}))},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>=d)){if(!l.length)return void(0===p&&h.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,d=r||1,h=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(h,"length",{get:function(){return l.length}}),h}var y,b=""+r,x=1,P=1/0,k=n.keys,E="function"==typeof setImmediate;y=E?setImmediate:typeof process!==b&&process.nextTick?process.nextTick:setTimeout;var T={curry:a,concurrent:l,series:p,waterfall:s,each:h(),map:d(),filter:v(),queue:g,emitter:m};typeof module!==b&&module.exports?module.exports=T:t.contra=T}(Object,this);
/**
* contra - Asynchronous flow control with a functional taste to it
* @version v1.6.1
* @version v1.6.2
* @link https://github.com/bevacqua/contra

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

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

// contra@v1.6.1, MIT licensed. https://github.com/bevacqua/contra
// contra@v1.6.2, 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.1",
"version": "1.6.2",
"homepage": "https://github.com/bevacqua/contra",

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

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

var λ = {
var contra = {
curry: _curry,

@@ -218,6 +218,6 @@ concurrent: _concurrent,

if (typeof module !== undef && module.exports) {
module.exports = λ;
module.exports = contra;
} else {
root.contra = λ;
root.contra = contra;
}
})(Object, this);
'use strict';
var λ = typeof contra !== 'undefined' ? contra : require('..');
var contra = typeof contra !== 'undefined' ? contra : require('..');
var a = typeof assert !== 'undefined' ? assert : require('assert');

@@ -36,3 +36,3 @@

λ.concurrent(tasks, 4, d);
contra.concurrent(tasks, 4, d);
});

@@ -64,4 +64,4 @@ });

λ.map(items, 4, mapper, d);
contra.map(items, 4, mapper, d);
});
});
'use strict';
var λ = typeof contra !== 'undefined' ? contra : require('..');
var contra = typeof contra !== 'undefined' ? contra : require('..');
var a = typeof assert !== 'undefined' ? assert : require('assert');

@@ -29,3 +29,3 @@

}
λ.waterfall([b,c],d);
contra.waterfall([b,c],d);
});

@@ -56,3 +56,3 @@ });

}
λ.series([b,c],d);
contra.series([b,c],d);
});

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

}
λ.series({ e: b, f: c }, d);
contra.series({ e: b, f: c }, d);
});

@@ -105,3 +105,3 @@

}
λ.series([b,c],d);
contra.series([b,c],d);
});

@@ -132,3 +132,3 @@ });

}
λ.concurrent([b,c],d);
contra.concurrent([b,c],d);
});

@@ -157,3 +157,3 @@

}
λ.concurrent({ a: b, d: c }, d);
contra.concurrent({ a: b, d: c }, d);
});

@@ -174,3 +174,3 @@

}
λ.concurrent([b,c],d);
contra.concurrent([b,c],d);
});

@@ -186,3 +186,3 @@ });

};
var applied = λ.curry(fn, 1, 3, 'c');
var applied = contra.curry(fn, 1, 3, 'c');
applied();

@@ -199,7 +199,7 @@ });

};
var applied = λ.curry(fn, 1, 3, 'c');
var applied = contra.curry(fn, 1, 3, 'c');
applied('d', 'e');
});
it('should play well with λ.series', function (done) {
it('should play well with contra.series', function (done) {
var cb = false, cc = false;

@@ -227,5 +227,5 @@ function b (n, next) {

}
λ.series([
λ.curry(b, 1),
λ.curry(c, ['a']),
contra.series([
contra.curry(b, 1),
contra.curry(c, ['a']),
], d);

@@ -248,3 +248,3 @@ });

}
λ.each(['b','c'],t,d);
contra.each(['b','c'],t,d);
});

@@ -264,3 +264,3 @@

}
λ.each({ a: 'b', b: 'c' }, t, d);
contra.each({ a: 'b', b: 'c' }, t, d);
});

@@ -277,3 +277,3 @@

}
λ.each(['b','c','e'],t,d);
contra.each(['b','c','e'],t,d);
});

@@ -298,3 +298,3 @@

λ.each(items, iterator, d);
contra.each(items, iterator, d);
});

@@ -319,3 +319,3 @@

λ.each(items, iterator, d);
contra.each(items, iterator, d);
});

@@ -337,3 +337,3 @@ });

}
λ.each.series(['b','c'],t,d);
contra.each.series(['b','c'],t,d);
});

@@ -353,3 +353,3 @@

}
λ.each.series({ a: 'b', b: 'c' }, t, d);
contra.each.series({ a: 'b', b: 'c' }, t, d);
});

@@ -369,3 +369,3 @@

}
λ.each.series(['b','c'],t,d);
contra.each.series(['b','c'],t,d);
});

@@ -386,3 +386,3 @@ });

}
λ.map(['b','c'],t,d);
contra.map(['b','c'],t,d);
});

@@ -401,3 +401,3 @@

}
λ.map({ a: 'b', b: 'c' }, t, d);
contra.map({ a: 'b', b: 'c' }, t, d);
});

@@ -414,3 +414,3 @@

}
λ.map(['b','c','e'],t,d);
contra.map(['b','c','e'],t,d);
});

@@ -442,3 +442,3 @@

λ.map(items, iterator, d);
contra.map(items, iterator, d);
});

@@ -470,3 +470,3 @@

λ.map(items, iterator, d);
contra.map(items, iterator, d);
});

@@ -487,3 +487,3 @@ });

}
λ.map.series(['b','c'],t,d);
contra.map.series(['b','c'],t,d);
});

@@ -502,3 +502,3 @@

}
λ.map.series({ a: 'b', b: 'c' }, t, d);
contra.map.series({ a: 'b', b: 'c' }, t, d);
});

@@ -515,3 +515,3 @@

}
λ.map.series(['b','c'],t,d);
contra.map.series(['b','c'],t,d);
});

@@ -531,3 +531,3 @@

}
λ.map.series(['b','c'],t,d);
contra.map.series(['b','c'],t,d);
});

@@ -548,3 +548,3 @@ });

}
λ.filter([1,2,'b',3,'c',5],t,d);
contra.filter([1,2,'b',3,'c',5],t,d);
});

@@ -562,3 +562,3 @@

}
λ.filter({ n: 3, a: 'b', b: 'c', c: 4, d: 5, e: 6 }, t, d);
contra.filter({ n: 3, a: 'b', b: 'c', c: 4, d: 5, e: 6 }, t, d);
});

@@ -575,3 +575,3 @@

}
λ.filter(['b','c','e'],t,d);
contra.filter(['b','c','e'],t,d);
});

@@ -596,3 +596,3 @@

λ.filter(items, iterator, d);
contra.filter(items, iterator, d);
});

@@ -617,3 +617,3 @@

λ.filter(items, iterator, d);
contra.filter(items, iterator, d);
});

@@ -633,3 +633,3 @@ });

}
λ.filter.series([1,2,'b',3,'c',5],t,d);
contra.filter.series([1,2,'b',3,'c',5],t,d);
});

@@ -647,3 +647,3 @@

}
λ.filter.series({ n: 3, a: 'b', b: 'c', c: 4, d: 5, e: 6 }, t, d);
contra.filter.series({ n: 3, a: 'b', b: 'c', c: 4, d: 5, e: 6 }, t, d);
});

@@ -665,3 +665,3 @@ });

}
var q = λ.queue(w);
var q = contra.queue(w);
q.push('a', d);

@@ -682,3 +682,3 @@ });

}
var q = λ.queue(w);
var q = contra.queue(w);
q.pause();

@@ -702,3 +702,3 @@ q.push('a', d);

}
var q = λ.queue(w);
var q = contra.queue(w);
q.push('a', d);

@@ -719,3 +719,3 @@ });

}
var q = λ.queue(w);
var q = contra.queue(w);
q.on('drain', drained);

@@ -730,3 +730,3 @@ q.push([], d);

λ.emitter(thing);
contra.emitter(thing);

@@ -748,3 +748,3 @@ a.ok(thing.emit);

it('should just work without arguments', function (done) {
var thing = λ.emitter();
var thing = contra.emitter();

@@ -769,3 +769,3 @@ a.ok(thing.emit);

λ.emitter(thing);
contra.emitter(thing);

@@ -790,3 +790,3 @@ function me () {

λ.emitter(thing);
contra.emitter(thing);

@@ -800,3 +800,3 @@ // the thing event type doesn't even exist.

λ.emitter(thing);
contra.emitter(thing);

@@ -816,3 +816,3 @@ function me () {

λ.emitter(thing);
contra.emitter(thing);

@@ -832,3 +832,3 @@ function me () {

λ.emitter(thing);
contra.emitter(thing);

@@ -842,3 +842,3 @@ a.throws(thing.emit.bind(thing, 'error'));

λ.emitter(thing);
contra.emitter(thing);

@@ -845,0 +845,0 @@ thing.on('error', function () {

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