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.6 to 1.6.7

2

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

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

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

# 1.6.7 Carbon Emitter
- New options to turn off event listeners on `λ.emitter` objects
# 1.6.5 Throw Up

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

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

@@ -158,5 +158,12 @@ * @license MIT

thing.off = function (type, fn) {
var et = evt[type];
if (!et) { return; }
et.splice(et.indexOf(fn), 1);
var c = arguments.length;
if (c === 1) {
delete evt[type];
} else if (c === 0) {
evt = {};
} else {
var et = evt[type];
if (!et) { return; }
et.splice(et.indexOf(fn), 1);
}
};

@@ -163,0 +170,0 @@ thing.emit = function () {

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

// contra@v1.6.6, 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&&g(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=y(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(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 t=i(arguments),r=t.shift(),f=u[r];if("error"===r&&e.throws!==!1&&!f)throw 1===t.length?t[0]:t;f&&(u[r]=f.filter(function(r){return e.async?o(r,t,n):r.apply(n,t),!r._once}))},n}function y(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 g,b=""+r,k=1,x=1/0,P="function"==typeof setImmediate;g=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:y,emitter:m};typeof module!==b&&module.exports?module.exports=w:t.contra=w}(Object,this);
// contra@v1.6.7, MIT licensed. https://github.com/bevacqua/contra
!function(n,t,e){"use strict";function r(){}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,e){n&&y(function(){n.apply(e||null,t||[])})}function f(n){function t(){e||(e=!0,(n||r).apply(null,arguments))}var e;return t.discard=function(){e=!0},t}function c(n,t,e){var r=n.shift();return r?(e&&e.discard(),o(t,[r]),!0):void 0}function a(){var n=i(arguments),t=n.shift();return function(){var e=i(arguments);t.apply(t,n.concat(e))}}function s(n,t){function e(){var t=i(arguments),u=n.shift();if(u){if(c(t,r))return;t.push(f(e)),o(u,t)}else o(r,arguments)}var r=f(t);e()}function l(t,e,r){function a(n,e){function r(){var t=i(arguments);c(t,s)||(h[n]=t.shift(),e())}o(t[n],[r])}r||(r=e,e=x);var s=f(r),l=g(a,e),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,e,r){var i=function(r,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(r),s=u(r)?[]:{};a.forEach(function(n){s[n]=function(t){3===o.length?o(r[n],n,t):o(r[n],t)}}),l(s,t||i,e?e(r,f):f)};return r||(i.series=h(k,e,!0)),i}function d(n){function t(n,t){return function(n){t(n)}}return h(n,t)}function v(t){function e(t,e){return function(r,i){function o(n,t){return!!i[t]}function f(){var e={};return n.keys(t).forEach(function(n){o(null,n)&&(e[n]=t[n])}),e}return r?void e(r):void e(null,u(i)?t.filter(o):f())}}return h(t,e)}function m(n,t){var r=t||{},u={};return n===e&&(n={}),n.on=function(n,t){u[n]?u[n].push(t):u[n]=[t]},n.once=function(t,e){e._once=!0,n.on(t,e)},n.off=function(n,t){var e=arguments.length;if(1===e)delete u[n];else if(0===e)u={};else{var r=u[n];if(!r)return;r.splice(r.indexOf(t),1)}},n.emit=function(){var t=i(arguments),e=t.shift(),f=u[e];if("error"===e&&r.throws!==!1&&!f)throw 1===t.length?t[0]:t;f&&(u[e]=f.filter(function(e){return r.async?o(e,t,n):e.apply(n,t),!e._once}))},n}function g(t,e){function r(n,t,e){var r=u(t)?t:[t];r.forEach(function(t){l[n]({t:t,done:e})}),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=e||1,d=m({push:r.bind(null,"push"),unshift:r.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=""+e,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.6
* @version v1.6.7
* @link https://github.com/bevacqua/contra

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

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

// contra@v1.6.6, MIT licensed. https://github.com/bevacqua/contra
// contra@v1.6.7, 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.6",
"version": "1.6.7",
"homepage": "https://github.com/bevacqua/contra",

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

@@ -341,2 +341,4 @@ ![contra.png][logo]

- `off(type, fn)` Unregisters an event listener `fn` from `type` events
- `off(type)` Unregisters all event listeners from `type` events
- `off()` Unregisters all event listeners

@@ -343,0 +345,0 @@ The emitter can be configured with the following options, too.

@@ -152,5 +152,12 @@ (function (Object, root, undefined) {

thing.off = function (type, fn) {
var et = evt[type];
if (!et) { return; }
et.splice(et.indexOf(fn), 1);
var c = arguments.length;
if (c === 1) {
delete evt[type];
} else if (c === 0) {
evt = {};
} else {
var et = evt[type];
if (!et) { return; }
et.splice(et.indexOf(fn), 1);
}
};

@@ -157,0 +164,0 @@ thing.emit = 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