Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

emmett

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

emmett - npm Package Compare versions

Comparing version 3.1.1 to 3.1.2

7

emmett.js

@@ -481,3 +481,6 @@ (function() {

parent.splice(parent.indexOf(onces[j]), 1);
const onceIndex = parent.indexOf(onces[j]);
if (onceIndex !== -1) {
parent.splice(onceIndex, 1);
}
}

@@ -540,3 +543,3 @@ }

*/
Emitter.version = '3.1.1';
Emitter.version = '3.1.2';

@@ -543,0 +546,0 @@

/**
* emmett - A custom event emitter for Node.js and the browser.
* @version v3.1.1
* @version v3.1.2
* @link https://github.com/jacomyal/emmett
* @license MIT
*/
(function(){"use strict";function t(t,e){var n,r={};for(n in t)r[n]=t[n];for(n in e)r[n]=e[n];return r}function e(t){return!(!t||"object"!=typeof t||Array.isArray(t)||t instanceof Function||t instanceof RegExp)}function n(t,e,n){var r,s,i,l;for(s in t)e.call(n||null,s,t[s]);if(Object.getOwnPropertySymbols)for(r=Object.getOwnPropertySymbols(t),i=0,l=r.length;l>i;i++)e.call(n||null,r[i],t[r[i]])}function r(t,e){t=t||[];var n,r,s=[];for(r=0,n=t.length;n>r;r++)t[r].fn!==e&&s.push(t[r]);return s}var s={once:"boolean",scope:"object"},i=0,l=function(){this._enabled=!0,this.unbindAll()};l.prototype.unbindAll=function(){return this._handlers={},this._handlersAll=[],this._handlersComplex=[],this},l.prototype.on=function(t,r,l){var o,h,a,f,p,u,d;if(e(t))return n(t,function(t,e){this.on(t,e,r)},this),this;for("function"==typeof t&&(l=r,r=t,t=null),p=[].concat(t),o=0,h=p.length;h>o;o++){if(f=p[o],d={order:i++,fn:r},"string"==typeof f||"symbol"==typeof f)this._handlers[f]||(this._handlers[f]=[]),u=this._handlers[f],d.type=f;else if(f instanceof RegExp)u=this._handlersComplex,d.pattern=f;else{if(null!==f)throw Error("Emitter.on: invalid event.");u=this._handlersAll}for(a in l||{})s[a]&&(d[a]=l[a]);u.push(d)}return this},l.prototype.once=function(){var n=Array.prototype.slice.call(arguments),r=n.length-1;return e(n[r])&&n.length>1?n[r]=t(n[r],{once:!0}):n.push({once:!0}),this.on.apply(this,n)},l.prototype.off=function(t,s){var i,l,o,h;if(1===arguments.length&&"function"==typeof t){s=arguments[0];for(o in this._handlers)this._handlers[o]=r(this._handlers[o],s),0===this._handlers[o].length&&delete this._handlers[o];this._handlersAll=r(this._handlersAll,s),this._handlersComplex=r(this._handlersComplex,s)}else if(1!==arguments.length||"string"!=typeof t&&"symbol"!=typeof t)if(2===arguments.length){var a=[].concat(t);for(i=0,l=a.length;l>i;i++)h=a[i],this._handlers[h]=r(this._handlers[h],s),0===(this._handlers[h]||[]).length&&delete this._handlers[h]}else e(t)&&n(t,this.off,this);else delete this._handlers[t];return this},l.prototype.listeners=function(t){var e,n,r,s=this._handlersAll||[],i=!1;if(!t)throw Error("Emitter.listeners: no event provided.");for(s=s.concat(this._handlers[t]||[]),n=0,r=this._handlersComplex.length;r>n;n++)e=this._handlersComplex[n],~t.search(e.pattern)&&(i=!0,s.push(e));return this._handlersAll.length||i?s.sort(function(t,e){return t.order-e.order}):s.slice(0)},l.prototype.emit=function(t,r){if(!this._enabled)return this;if(e(t))return n(t,this.emit,this),this;var s,i,l,o,h,a,f,p,u=[].concat(t),d=[];for(h=0,f=u.length;f>h;h++){for(l=this.listeners(u[h]),a=0,p=l.length;p>a;a++)o=l[a],s={type:u[h],target:this},arguments.length>1&&(s.data=r),o.fn.call("scope"in o?o.scope:this,s),o.once&&d.push(o);for(a=d.length-1;a>=0;a--)i=d[a].type?this._handlers[d[a].type]:d[a].pattern?this._handlersComplex:this._handlersAll,i.splice(i.indexOf(d[a]),1)}return this},l.prototype.kill=function(){this.unbindAll(),this._handlers=null,this._handlersAll=null,this._handlersComplex=null,this._enabled=!1,this.unbindAll=this.on=this.once=this.off=this.emit=this.listeners=Function.prototype},l.prototype.disable=function(){return this._enabled=!1,this},l.prototype.enable=function(){return this._enabled=!0,this},l.version="3.1.1","undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=l),exports.Emitter=l):"function"==typeof define&&define.amd?define("emmett",[],function(){return l}):this.Emitter=l}).call(this);
(function(){"use strict";function t(t,e){var n,r={};for(n in t)r[n]=t[n];for(n in e)r[n]=e[n];return r}function e(t){return t&&"object"==typeof t&&!Array.isArray(t)&&!(t instanceof Function)&&!(t instanceof RegExp)}function n(t,e,n){var r,s,i,l;for(s in t)e.call(n||null,s,t[s]);if(Object.getOwnPropertySymbols)for(r=Object.getOwnPropertySymbols(t),i=0,l=r.length;i<l;i++)e.call(n||null,r[i],t[r[i]])}function r(t,e){t=t||[];var n,r,s=[];for(r=0,n=t.length;r<n;r++)t[r].fn!==e&&s.push(t[r]);return s}var s={once:"boolean",scope:"object"},i=0,l=function(){this._enabled=!0,this.unbindAll()};l.prototype.unbindAll=function(){return this._handlers={},this._handlersAll=[],this._handlersComplex=[],this},l.prototype.on=function(t,r,l){var o,h,a,f,p,d,u;if(e(t))return n(t,function(t,e){this.on(t,e,r)},this),this;for("function"==typeof t&&(l=r,r=t,t=null),p=[].concat(t),o=0,h=p.length;o<h;o++){if(f=p[o],u={order:i++,fn:r},"string"==typeof f||"symbol"==typeof f)this._handlers[f]||(this._handlers[f]=[]),d=this._handlers[f],u.type=f;else if(f instanceof RegExp)d=this._handlersComplex,u.pattern=f;else{if(null!==f)throw Error("Emitter.on: invalid event.");d=this._handlersAll}for(a in l||{})s[a]&&(u[a]=l[a]);d.push(u)}return this},l.prototype.once=function(){var n=Array.prototype.slice.call(arguments),r=n.length-1;return e(n[r])&&n.length>1?n[r]=t(n[r],{once:!0}):n.push({once:!0}),this.on.apply(this,n)},l.prototype.off=function(t,s){var i,l,o,h;if(1===arguments.length&&"function"==typeof t){s=arguments[0];for(o in this._handlers)this._handlers[o]=r(this._handlers[o],s),0===this._handlers[o].length&&delete this._handlers[o];this._handlersAll=r(this._handlersAll,s),this._handlersComplex=r(this._handlersComplex,s)}else if(1!==arguments.length||"string"!=typeof t&&"symbol"!=typeof t)if(2===arguments.length){var a=[].concat(t);for(i=0,l=a.length;i<l;i++)h=a[i],this._handlers[h]=r(this._handlers[h],s),0===(this._handlers[h]||[]).length&&delete this._handlers[h]}else e(t)&&n(t,this.off,this);else delete this._handlers[t];return this},l.prototype.listeners=function(t){var e,n,r,s=this._handlersAll||[],i=!1;if(!t)throw Error("Emitter.listeners: no event provided.");for(s=s.concat(this._handlers[t]||[]),n=0,r=this._handlersComplex.length;n<r;n++)e=this._handlersComplex[n],~t.search(e.pattern)&&(i=!0,s.push(e));return this._handlersAll.length||i?s.sort(function(t,e){return t.order-e.order}):s.slice(0)},l.prototype.emit=function(t,r){if(!this._enabled)return this;if(e(t))return n(t,this.emit,this),this;var s,i,l,o,h,a,f,p,d=[].concat(t),u=[];for(h=0,f=d.length;h<f;h++){for(l=this.listeners(d[h]),a=0,p=l.length;a<p;a++)o=l[a],s={type:d[h],target:this},arguments.length>1&&(s.data=r),o.fn.call("scope"in o?o.scope:this,s),o.once&&u.push(o);for(a=u.length-1;a>=0;a--){i=u[a].type?this._handlers[u[a].type]:u[a].pattern?this._handlersComplex:this._handlersAll;const c=i.indexOf(u[a]);c!==-1&&i.splice(c,1)}}return this},l.prototype.kill=function(){this.unbindAll(),this._handlers=null,this._handlersAll=null,this._handlersComplex=null,this._enabled=!1,this.unbindAll=this.on=this.once=this.off=this.emit=this.listeners=Function.prototype},l.prototype.disable=function(){return this._enabled=!1,this},l.prototype.enable=function(){return this._enabled=!0,this},l.version="3.1.2","undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=l),exports.Emitter=l):"function"==typeof define&&define.amd?define("emmett",[],function(){return l}):this.Emitter=l}).call(this);
{
"name": "emmett",
"version": "3.1.1",
"version": "3.1.2",
"description": "A custom event emitter for Node.js and the browser.",

@@ -5,0 +5,0 @@ "main": "emmett.js",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc