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

futoin-asyncevent

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

futoin-asyncevent - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

5

CHANGELOG.txt
=== (next)
=== 1.0.2 (2018-05-23) ===
FIXED: improved browser tests to use dist module
=== 1.0.1 (2018-05-10) ===
CHANGED: upgraded webpack to v4

@@ -4,0 +7,0 @@ NEW: Node.js v10 testing

2

dist/futoin-asyncevent.js

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

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["futoin-asyncevent"]=t():e.$asyncevent=t()}(window,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i="undefined"!=typeof setImmediate&&setImmediate||function(e){return setTimeout(e,0)},a=Symbol("FutoIn Event Emitter"),u="_evt_",c="_evtonce_",f=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._max=n;var r=!0,o=!1,i=void 0;try{for(var a,f=t[Symbol.iterator]();!(r=(a=f.next()).done);r=!0){var l=a.value;this[""+u+l]=[],this[""+c+l]=[]}}catch(e){o=!0,i=e}finally{try{!r&&f.return&&f.return()}finally{if(o)throw i}}}return r(e,[{key:"on",value:function(e,t){try{var n=this[""+u+e];n.length===this._max&&console.warn("Hitting max handler limit for: "+e),n.push(t)}catch(t){throw new Error("Unknown event: "+e)}}},{key:"once",value:function(e,t){try{var n=this[""+c+e];n.length===this._max&&console.warn("Hitting max once handler limit for: "+e),n.push(t)}catch(t){throw new Error("Unknown event: "+e)}}},{key:"off",value:function(e,t){try{var n=""+u+e;this[n]=this[n].filter(function(e){return e!==t});var r=""+c+e;this[r]=this[r].filter(function(e){return e!==t})}catch(t){throw new Error("Unknown event: "+e)}}},{key:"emit",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];try{var o=function(e){i(function(){return e.apply(void 0,n)})},a=!0,f=!1,l=void 0;try{for(var v,s=this[""+u+e][Symbol.iterator]();!(a=(v=s.next()).done);a=!0)o(v.value)}catch(e){f=!0,l=e}finally{try{!a&&s.return&&s.return()}finally{if(f)throw l}}var y=this[""+c+e];if(y.length>0){var h=function(e){i(function(){return e.apply(void 0,n)})},b=!0,d=!1,m=void 0;try{for(var p,w=y[Symbol.iterator]();!(b=(p=w.next()).done);b=!0)h(p.value)}catch(e){d=!0,m=e}finally{try{!b&&w.return&&w.return()}finally{if(d)throw m}}this[""+c+e]=[]}}catch(t){throw new Error("Unknown event: "+e)}}}],[{key:Symbol.hasInstance,value:function(e){return void 0!==e[a]}},{key:"attach",value:function(t,n){var r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8;if(void 0!==t[a])throw new Error("Already attached");var u=new e(n,i);Object.defineProperties(t,(o(r={},a,{configurable:!1,enumerable:!1,writable:!1,value:u}),o(r,"on",{configurable:!1,enumerable:!1,writable:!1,value:function(e,t){return u.on(e,t)}}),o(r,"off",{configurable:!1,enumerable:!1,writable:!1,value:function(e,t){return u.off(e,t)}}),o(r,"once",{configurable:!1,enumerable:!1,writable:!1,value:function(e,t){return u.once(e,t)}}),o(r,"emit",{configurable:!1,enumerable:!1,writable:!1,value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return u.emit.apply(u,[e].concat(n))}}),r))}},{key:"setMaxListeners",value:function(e,t){e[a]._max=t}},{key:"SYM_EVENT_EMITTER",get:function(){return a}}]),e}();e.exports=f},function(e,t,n){"use strict";var r=n(0),o=r.attach;o.EventEmitter=r,e.exports=o},function(e,t,n){"use strict";!function(t){var r=t.FutoIn||t.futoin||{};if(void 0===r.$asyncevent){var o=n(1);t.$asyncevent=o,r.$asyncevent=o,r.EventEmitter=o.EventEmitter,t.FutoIn=r,t.futoin=r}e.exports=r.$asyncevent}(window)}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["futoin-asyncevent"]=t():e.$asyncevent=t()}(window,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i="undefined"!=typeof setImmediate&&setImmediate||function(e){return setTimeout(e,0)},a=Symbol("FutoIn Event Emitter"),u="_evt_",c="_evtonce_",f=function(){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this._max=n;var r=!0,o=!1,i=void 0;try{for(var a,f=e[Symbol.iterator]();!(r=(a=f.next()).done);r=!0){var l=a.value;this[""+u+l]=[],this[""+c+l]=[]}}catch(e){o=!0,i=e}finally{try{!r&&f.return&&f.return()}finally{if(o)throw i}}}return r(t,[{key:"on",value:function(e,t){try{var n=this[""+u+e];n.length===this._max&&console.warn("Hitting max handler limit for: "+e),n.push(t)}catch(t){throw new Error("Unknown event: "+e)}}},{key:"once",value:function(e,t){try{var n=this[""+c+e];n.length===this._max&&console.warn("Hitting max once handler limit for: "+e),n.push(t)}catch(t){throw new Error("Unknown event: "+e)}}},{key:"off",value:function(e,t){try{var n=""+u+e;this[n]=this[n].filter(function(e){return e!==t});var r=""+c+e;this[r]=this[r].filter(function(e){return e!==t})}catch(t){throw new Error("Unknown event: "+e)}}},{key:"emit",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];try{var o=function(e){i(function(){return e.apply(void 0,n)})},a=!0,f=!1,l=void 0;try{for(var v,s=this[""+u+e][Symbol.iterator]();!(a=(v=s.next()).done);a=!0)o(v.value)}catch(e){f=!0,l=e}finally{try{!a&&s.return&&s.return()}finally{if(f)throw l}}var y=this[""+c+e];if(y.length>0){var h=function(e){i(function(){return e.apply(void 0,n)})},b=!0,d=!1,m=void 0;try{for(var p,w=y[Symbol.iterator]();!(b=(p=w.next()).done);b=!0)h(p.value)}catch(e){d=!0,m=e}finally{try{!b&&w.return&&w.return()}finally{if(d)throw m}}this[""+c+e]=[]}}catch(t){throw new Error("Unknown event: "+e)}}}],[{key:Symbol.hasInstance,value:function(e){return void 0!==e[a]}},{key:"attach",value:function(t,n){var r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8;if(void 0!==t[a])throw new Error("Already attached");var u=new e.exports(n,i);Object.defineProperties(t,(o(r={},a,{configurable:!1,enumerable:!1,writable:!1,value:u}),o(r,"on",{configurable:!1,enumerable:!1,writable:!1,value:function(e,t){return u.on(e,t)}}),o(r,"off",{configurable:!1,enumerable:!1,writable:!1,value:function(e,t){return u.off(e,t)}}),o(r,"once",{configurable:!1,enumerable:!1,writable:!1,value:function(e,t){return u.once(e,t)}}),o(r,"emit",{configurable:!1,enumerable:!1,writable:!1,value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return u.emit.apply(u,[e].concat(n))}}),r))}},{key:"setMaxListeners",value:function(e,t){e[a]._max=t}},{key:"SYM_EVENT_EMITTER",get:function(){return a}}]),t}();e.exports=f},function(e,t,n){"use strict";var r=n(0),o=r.attach;o.EventEmitter=r,e.exports=o},function(e,t,n){"use strict";!function(t){var r=t.FutoIn||t.futoin||{};if(void 0===r.$asyncevent){var o=n(1);t.$asyncevent=o,r.$asyncevent=o,r.EventEmitter=o.EventEmitter,t.FutoIn=r,t.futoin=r}e.exports=r.$asyncevent}(window)}])});

@@ -258,3 +258,3 @@ 'use strict';

var ee = new EventEmitter(allowed_events, max_listeners);
var ee = new module.exports(allowed_events, max_listeners);

@@ -261,0 +261,0 @@ Object.defineProperties(instance, (_Object$definePropert = {}, _defineProperty(_Object$definePropert, SYM_EVENT_EMITTER, {

@@ -8,12 +8,6 @@ 'use strict';

//
var $asyncevent = void 0;
var expect = void 0;
var $asyncevent = typeof window !== 'undefined' ? require('futoin-asyncevent') : module.require('../lib/asyncevent');
if (typeof window !== 'undefined') {
$asyncevent = window.$asyncevent;
expect = window.chai.expect;
} else {
$asyncevent = module.require('../lib/asyncevent');
expect = module.require('chai').expect;
}
var _require = require('chai'),
expect = _require.expect;

@@ -20,0 +14,0 @@ var SYM_EVENT_EMITTER = $asyncevent.EventEmitter.SYM_EVENT_EMITTER;

@@ -149,3 +149,3 @@ 'use strict';

const ee = new EventEmitter( allowed_events, max_listeners );
const ee = new module.exports( allowed_events, max_listeners );

@@ -152,0 +152,0 @@ Object.defineProperties(

{
"name": "futoin-asyncevent",
"version": "1.0.1",
"version": "1.0.2",
"description": "FutoIn AsyncEvent - FTN15 compliant event emitter",

@@ -56,7 +56,7 @@ "main": "lib/asyncevent.js",

"grunt-text-replace": "^0.4.0",
"grunt-webpack": "^3.1.1",
"grunt-webpack": "^3.1.2",
"istanbul": "^0.4.5",
"mocha": "^5.1.1",
"webpack": "^4.8.1"
"mocha": "^5.2.0",
"webpack": "^4.8.3"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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