async-try-catch
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -39,21 +39,10 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.AsyncTryCatch = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | ||
// First, get Node.js core Events module if possible and check if NextGen Events is part of this project | ||
if ( ! process.browser ) | ||
if ( process.browser && ! global.setImmediate ) | ||
{ | ||
AsyncTryCatch.NodeEvents = require( 'events' ) ; | ||
try { | ||
AsyncTryCatch.NextGenEvents = require( 'nextgen-events' ) ; | ||
} catch ( error ) {} | ||
global.setImmediate = function setImmediate( fn ) { return setTimeout( fn , 0 ) ; } ; | ||
global.clearImmediate = function clearImmediate( timer ) { return clearTimeout( timer ) ; } ; | ||
} | ||
else | ||
{ | ||
if ( ! global.setImmediate ) | ||
{ | ||
global.setImmediate = function setImmediate( fn ) { return setTimeout( fn , 0 ) ; } ; | ||
global.clearImmediate = function clearImmediate( timer ) { return clearTimeout( timer ) ; } ; | ||
} | ||
} | ||
if ( ! global.Vanilla ) | ||
@@ -130,17 +119,50 @@ { | ||
AsyncTryCatch.addListenerWrapper = function addListenerWrapper( originalMethod , listenerIndex , listenerKey ) | ||
// for setTimeout(), setImmediate(), process.nextTick() | ||
AsyncTryCatch.timerWrapper = function timerWrapper( originalMethod , fn ) | ||
{ | ||
var fn , context , wrapperFn , | ||
args = Array.prototype.slice.call( arguments , 3 ) ; | ||
args = Array.prototype.slice.call( arguments , 1 ) ; | ||
if ( listenerIndex < 0 ) { listenerIndex = args.length - listenerIndex ; } | ||
if ( typeof fn !== 'function' || ! AsyncTryCatch.stack.length ) | ||
{ | ||
return originalMethod.apply( this , args ) ; | ||
} | ||
fn = args[ listenerIndex ] ; | ||
context = AsyncTryCatch.stack[ AsyncTryCatch.stack.length - 1 ] ; | ||
wrapperFn = function() { | ||
try { | ||
AsyncTryCatch.stack.push( context ) ; | ||
fn.apply( this , arguments ) ; | ||
AsyncTryCatch.stack.pop() ; | ||
} | ||
catch ( error ) { | ||
AsyncTryCatch.stack.pop() ; | ||
context.callCatchFn( error ) ; | ||
} | ||
} ; | ||
args[ 0 ] = wrapperFn ; | ||
return originalMethod.apply( this , args ) ; | ||
} ; | ||
// for Node-EventEmitter-compatible .addListener() | ||
AsyncTryCatch.addListenerWrapper = function addListenerWrapper( originalMethod , eventName , fn , options ) | ||
{ | ||
var fn , context , wrapperFn ; | ||
// NextGen event compatibility | ||
if ( typeof fn !== 'function' && listenerKey ) { fn = fn[ listenerKey ] ; } | ||
if ( typeof fn === 'object' ) | ||
{ | ||
options = fn ; | ||
fn = options.fn ; | ||
delete options.fn ; | ||
} | ||
if ( typeof fn !== 'function' || ! AsyncTryCatch.stack.length ) | ||
{ | ||
return originalMethod.apply( this , args ) ; | ||
return originalMethod.call( this , eventName , fn , options ) ; | ||
} | ||
@@ -150,16 +172,12 @@ | ||
// This method cover setTimeout(), setImmediate() and process.nextTick() | ||
if ( this ) | ||
// Assume that the function is only wrapped once per eventEmitter | ||
if ( this.__fnToWrapperMap ) | ||
{ | ||
// Assume that the function is only wrapped once per eventEmitter | ||
if ( this.__fnToWrapperMap ) | ||
{ | ||
wrapperFn = this.__fnToWrapperMap.get( fn ) ; | ||
} | ||
else | ||
{ | ||
// Create the map, make it non-enumerable | ||
Object.defineProperty( this , '__fnToWrapperMap', { value: new WeakMap() } ) ; | ||
} | ||
wrapperFn = this.__fnToWrapperMap.get( fn ) ; | ||
} | ||
else | ||
{ | ||
// Create the map, make it non-enumerable | ||
Object.defineProperty( this , '__fnToWrapperMap', { value: new WeakMap() } ) ; | ||
} | ||
@@ -180,8 +198,6 @@ if ( ! wrapperFn ) | ||
if ( this ) { this.__fnToWrapperMap.set( fn , wrapperFn ) ; } | ||
this.__fnToWrapperMap.set( fn , wrapperFn ) ; | ||
} | ||
args[ listenerIndex ] = wrapperFn ; | ||
return originalMethod.apply( this , args ) ; | ||
return originalMethod.call( this , eventName , wrapperFn , options ) ; | ||
} ; | ||
@@ -191,22 +207,12 @@ | ||
AsyncTryCatch.removeListenerWrapper = function removeListenerWrapper( originalMethod , listenerIndex , listenerKey ) | ||
AsyncTryCatch.removeListenerWrapper = function removeListenerWrapper( originalMethod , eventName , fn ) | ||
{ | ||
var fn , context , wrapperFn , | ||
args = Array.prototype.slice.call( arguments , 3 ) ; | ||
if ( listenerIndex < 0 ) { listenerIndex = args.length - listenerIndex ; } | ||
fn = args[ listenerIndex ] ; | ||
//console.log( 'fn:' , fn ) ; | ||
// NextGen event compatibility | ||
//if ( typeof fn !== 'function' && listenerKey ) { fn = fn[ listenerKey ] ; } | ||
// 'this' is always defined here | ||
if ( typeof fn === 'function' && this.__fnToWrapperMap ) | ||
{ | ||
args[ listenerIndex ] = this.__fnToWrapperMap.get( fn ) || fn ; | ||
fn = this.__fnToWrapperMap.get( fn ) || fn ; | ||
} | ||
return originalMethod.apply( this , args ) ; | ||
return originalMethod.call( this , eventName , fn ) ; | ||
} ; | ||
@@ -216,43 +222,40 @@ | ||
AsyncTryCatch.setTimeout = AsyncTryCatch.addListenerWrapper.bind( undefined , global.Vanilla.setTimeout , 0 , null ) ; | ||
AsyncTryCatch.setImmediate = AsyncTryCatch.addListenerWrapper.bind( undefined , global.Vanilla.setImmediate , 0 , null ) ; | ||
AsyncTryCatch.setTimeout = AsyncTryCatch.timerWrapper.bind( undefined , global.Vanilla.setTimeout ) ; | ||
AsyncTryCatch.setImmediate = AsyncTryCatch.timerWrapper.bind( undefined , global.Vanilla.setImmediate ) ; | ||
AsyncTryCatch.nextTick = AsyncTryCatch.timerWrapper.bind( process , global.Vanilla.nextTick ) ; | ||
// DO NOT BIND process as 'this', it is not mandatory for nextTick() to have a 'this' context, | ||
// and furthermore the lib would assume that we are in a real addListener() use-case | ||
AsyncTryCatch.nextTick = AsyncTryCatch.addListenerWrapper.bind( undefined , global.Vanilla.nextTick , 0 , null ) ; | ||
// NodeEvents on()/addListener() replacement | ||
AsyncTryCatch.addListener = function addListener() | ||
AsyncTryCatch.addListener = function addListener( eventName , fn ) | ||
{ | ||
AsyncTryCatch.addListenerWrapper.apply( this , [ AsyncTryCatch.NodeEvents.__addListener , 1 , null ].concat( Array.from( arguments ) ) ) ; | ||
AsyncTryCatch.addListenerWrapper.call( this , AsyncTryCatch.NodeEvents.__addListener , eventName , fn ) ; | ||
} ; | ||
// NodeEvents once() replacement | ||
AsyncTryCatch.addListenerOnce = function addListenerOnce() | ||
AsyncTryCatch.addListenerOnce = function addListenerOnce( eventName , fn ) | ||
{ | ||
AsyncTryCatch.addListenerWrapper.apply( this , [ AsyncTryCatch.NodeEvents.__addListenerOnce , 1 , null ].concat( Array.from( arguments ) ) ) ; | ||
AsyncTryCatch.addListenerWrapper.call( this , AsyncTryCatch.NodeEvents.__addListenerOnce , eventName , fn ) ; | ||
} ; | ||
// NodeEvents removeListener() replacement | ||
AsyncTryCatch.removeListener = function removeListener() | ||
AsyncTryCatch.removeListener = function removeListener( eventName , fn ) | ||
{ | ||
AsyncTryCatch.removeListenerWrapper.apply( this , [ AsyncTryCatch.NodeEvents.__removeListener , 1 , null ].concat( Array.from( arguments ) ) ) ; | ||
AsyncTryCatch.removeListenerWrapper.call( this , AsyncTryCatch.NodeEvents.__removeListener , eventName , fn ) ; | ||
} ; | ||
// NextGen Events on()/addListener() replacement | ||
AsyncTryCatch.ngevAddListener = function ngevAddListener() | ||
AsyncTryCatch.ngevAddListener = function ngevAddListener( eventName , fn , options ) | ||
{ | ||
AsyncTryCatch.addListenerWrapper.apply( this , [ AsyncTryCatch.NextGenEvents.on , 1 , 'fn' ].concat( Array.from( arguments ) ) ) ; | ||
AsyncTryCatch.addListenerWrapper.call( this , AsyncTryCatch.NextGenEvents.on , eventName , fn , options ) ; | ||
} ; | ||
// NextGen Events once() replacement | ||
AsyncTryCatch.ngevAddListenerOnce = function ngevAddListenerOnce() | ||
AsyncTryCatch.ngevAddListenerOnce = function ngevAddListenerOnce( eventName , fn , options ) | ||
{ | ||
AsyncTryCatch.addListenerWrapper.apply( this , [ AsyncTryCatch.NextGenEvents.once , 1 , 'fn' ].concat( Array.from( arguments ) ) ) ; | ||
AsyncTryCatch.addListenerWrapper.call( this , AsyncTryCatch.NextGenEvents.once , eventName , fn , options ) ; | ||
} ; | ||
// NextGen Events off()/removeListener() replacement | ||
AsyncTryCatch.ngevRemoveListener = function ngevRemoveListener() | ||
AsyncTryCatch.ngevRemoveListener = function ngevRemoveListener( eventName , fn ) | ||
{ | ||
AsyncTryCatch.removeListenerWrapper.apply( this , [ AsyncTryCatch.NextGenEvents.off , 1 , 'fn' ].concat( Array.from( arguments ) ) ) ; | ||
AsyncTryCatch.removeListenerWrapper.call( this , AsyncTryCatch.NextGenEvents.off , eventName , fn ) ; | ||
} ; | ||
@@ -274,2 +277,11 @@ | ||
// Global is checked first, in case we are running into browsers | ||
try { | ||
AsyncTryCatch.NodeEvents = global.EventEmitter || require( 'events' ) ; | ||
} catch ( error ) {} | ||
try { | ||
AsyncTryCatch.NextGenEvents = global.NextGenEvents || require( 'nextgen-events' ) ; | ||
} catch ( error ) {} | ||
if ( AsyncTryCatch.NodeEvents ) | ||
@@ -327,17 +339,6 @@ { | ||
{ | ||
if ( AsyncTryCatch.NodeEvents.__addListener ) | ||
{ | ||
AsyncTryCatch.NodeEvents.prototype.on = AsyncTryCatch.NodeEvents.__addListener ; | ||
AsyncTryCatch.NodeEvents.prototype.addListener = AsyncTryCatch.NodeEvents.__addListener ; | ||
} | ||
if ( AsyncTryCatch.NodeEvents.__addListenerOnce ) | ||
{ | ||
AsyncTryCatch.NodeEvents.prototype.once = AsyncTryCatch.NodeEvents.__addListenerOnce ; | ||
} | ||
if ( AsyncTryCatch.NodeEvents.__removeListener ) | ||
{ | ||
AsyncTryCatch.NodeEvents.prototype.removeListener = AsyncTryCatch.NodeEvents.__removeListener ; | ||
} | ||
AsyncTryCatch.NodeEvents.prototype.on = AsyncTryCatch.NodeEvents.__addListener ; | ||
AsyncTryCatch.NodeEvents.prototype.addListener = AsyncTryCatch.NodeEvents.__addListener ; | ||
AsyncTryCatch.NodeEvents.prototype.once = AsyncTryCatch.NodeEvents.__addListenerOnce ; | ||
AsyncTryCatch.NodeEvents.prototype.removeListener = AsyncTryCatch.NodeEvents.__removeListener ; | ||
} | ||
@@ -344,0 +345,0 @@ |
@@ -1,1 +0,1 @@ | ||
(function(e){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=e()}else if(typeof define==="function"&&define.amd){define([],e)}else{var t;if(typeof window!=="undefined"){t=window}else if(typeof global!=="undefined"){t=global}else if(typeof self!=="undefined"){t=self}else{t=this}t.AsyncTryCatch=e()}})(function(){var e,t,n;return function i(e,t,n){function r(o,a){if(!t[o]){if(!e[o]){var l=typeof require=="function"&&require;if(!a&&l)return l(o,!0);if(s)return s(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var c=t[o]={exports:{}};e[o][0].call(c.exports,function(t){var n=e[o][1][t];return r(n?n:t)},c,c.exports,i,e,t,n)}return t[o].exports}var s=typeof require=="function"&&require;for(var o=0;o<n.length;o++)r(n[o]);return r}({1:[function(e,t,n){(function(n,i){"use strict";function r(){throw new Error("Use AsyncTryCatch.try() instead.")}t.exports=r;i.AsyncTryCatch=r;if(!n.browser){r.NodeEvents=e("events");try{r.NextGenEvents=e("nextgen-events")}catch(s){}}else{if(!i.setImmediate){i.setImmediate=function o(e){return setTimeout(e,0)};i.clearImmediate=function a(e){return clearTimeout(e)}}}if(!i.Vanilla){i.Vanilla={};if(!i.Vanilla.setTimeout){i.Vanilla.setTimeout=setTimeout}if(!i.Vanilla.setImmediate){i.Vanilla.setImmediate=setImmediate}if(!i.Vanilla.nextTick){i.Vanilla.nextTick=n.nextTick}}r.stack=[];r.substituted=false;r.try=function l(e){var t=Object.create(r.prototype,{fn:{value:e,enumerable:true},parent:{value:r.stack[r.stack.length-1]}});return t};r.prototype.catch=function f(e){Object.defineProperties(this,{catchFn:{value:e,enumerable:true}});if(!r.substituted){r.substitute()}try{r.stack.push(this);this.fn();r.stack.pop()}catch(t){r.stack.pop();this.callCatchFn(t)}};r.prototype.callCatchFn=function c(e){if(!this.parent){this.catchFn(e);return}try{r.stack.push(this.parent);this.catchFn(e);r.stack.pop()}catch(e){r.stack.pop();this.parent.callCatchFn(e)}};r.addListenerWrapper=function u(e,t,n){var i,s,o,a=Array.prototype.slice.call(arguments,3);if(t<0){t=a.length-t}i=a[t];if(typeof i!=="function"&&n){i=i[n]}if(typeof i!=="function"||!r.stack.length){return e.apply(this,a)}s=r.stack[r.stack.length-1];if(this){if(this.__fnToWrapperMap){o=this.__fnToWrapperMap.get(i)}else{Object.defineProperty(this,"__fnToWrapperMap",{value:new WeakMap})}}if(!o){o=function(){try{r.stack.push(s);i.apply(this,arguments);r.stack.pop()}catch(e){r.stack.pop();s.callCatchFn(e)}};if(this){this.__fnToWrapperMap.set(i,o)}}a[t]=o;return e.apply(this,a)};r.removeListenerWrapper=function p(e,t,n){var i,r,s,o=Array.prototype.slice.call(arguments,3);if(t<0){t=o.length-t}i=o[t];if(typeof i==="function"&&this.__fnToWrapperMap){o[t]=this.__fnToWrapperMap.get(i)||i}return e.apply(this,o)};r.setTimeout=r.addListenerWrapper.bind(undefined,i.Vanilla.setTimeout,0,null);r.setImmediate=r.addListenerWrapper.bind(undefined,i.Vanilla.setImmediate,0,null);r.nextTick=r.addListenerWrapper.bind(undefined,i.Vanilla.nextTick,0,null);r.addListener=function h(){r.addListenerWrapper.apply(this,[r.NodeEvents.__addListener,1,null].concat(Array.from(arguments)))};r.addListenerOnce=function v(){r.addListenerWrapper.apply(this,[r.NodeEvents.__addListenerOnce,1,null].concat(Array.from(arguments)))};r.removeListener=function _(){r.removeListenerWrapper.apply(this,[r.NodeEvents.__removeListener,1,null].concat(Array.from(arguments)))};r.ngevAddListener=function d(){r.addListenerWrapper.apply(this,[r.NextGenEvents.on,1,"fn"].concat(Array.from(arguments)))};r.ngevAddListenerOnce=function g(){r.addListenerWrapper.apply(this,[r.NextGenEvents.once,1,"fn"].concat(Array.from(arguments)))};r.ngevRemoveListener=function y(){r.removeListenerWrapper.apply(this,[r.NextGenEvents.off,1,"fn"].concat(Array.from(arguments)))};r.substitute=function m(){r.substituted=true;i.setTimeout=r.setTimeout;i.setImmediate=r.setTimeout;n.nextTick=r.nextTick;if(r.NodeEvents){if(!r.NodeEvents.__addListener){r.NodeEvents.__addListener=r.NodeEvents.prototype.on}if(!r.NodeEvents.__addListenerOnce){r.NodeEvents.__addListenerOnce=r.NodeEvents.prototype.addListenerOnce}if(!r.NodeEvents.__removeListener){r.NodeEvents.__removeListener=r.NodeEvents.prototype.removeListener}r.NodeEvents.prototype.on=r.addListener;r.NodeEvents.prototype.addListener=r.addListener;r.NodeEvents.prototype.once=r.addListenerOnce;r.NodeEvents.prototype.removeListener=r.removeListener}if(r.NextGenEvents){r.NextGenEvents.prototype.on=r.ngevAddListener;r.NextGenEvents.prototype.addListener=r.ngevAddListener;r.NextGenEvents.prototype.once=r.ngevAddListenerOnce;r.NextGenEvents.prototype.off=r.ngevRemoveListener;r.NextGenEvents.prototype.removeListener=r.ngevRemoveListener}};r.restore=function L(){r.substituted=false;i.setTimeout=i.Vanilla.setTimeout;i.setImmediate=i.Vanilla.setImmediate;n.nextTick=i.Vanilla.nextTick;if(r.NodeEvents){if(r.NodeEvents.__addListener){r.NodeEvents.prototype.on=r.NodeEvents.__addListener;r.NodeEvents.prototype.addListener=r.NodeEvents.__addListener}if(r.NodeEvents.__addListenerOnce){r.NodeEvents.prototype.once=r.NodeEvents.__addListenerOnce}if(r.NodeEvents.__removeListener){r.NodeEvents.prototype.removeListener=r.NodeEvents.__removeListener}}if(r.NextGenEvents){r.NextGenEvents.prototype.on=r.NextGenEvents.on;r.NextGenEvents.prototype.addListener=r.NextGenEvents.on;r.NextGenEvents.prototype.once=r.NextGenEvents.once;r.NextGenEvents.prototype.off=r.NextGenEvents.off;r.NextGenEvents.prototype.removeListener=r.NextGenEvents.removeListener}}}).call(this,e("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{_process:3,events:2,"nextgen-events":4}],2:[function(e,t,n){function i(){this._events=this._events||{};this._maxListeners=this._maxListeners||undefined}t.exports=i;i.EventEmitter=i;i.prototype._events=undefined;i.prototype._maxListeners=undefined;i.defaultMaxListeners=10;i.prototype.setMaxListeners=function(e){if(!s(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");this._maxListeners=e;return this};i.prototype.emit=function(e){var t,n,i,s,l,f;if(!this._events)this._events={};if(e==="error"){if(!this._events.error||o(this._events.error)&&!this._events.error.length){t=arguments[1];if(t instanceof Error){throw t}throw TypeError('Uncaught, unspecified "error" event.')}}n=this._events[e];if(a(n))return false;if(r(n)){switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1);n.apply(this,s)}}else if(o(n)){s=Array.prototype.slice.call(arguments,1);f=n.slice();i=f.length;for(l=0;l<i;l++)f[l].apply(this,s)}return true};i.prototype.addListener=function(e,t){var n;if(!r(t))throw TypeError("listener must be a function");if(!this._events)this._events={};if(this._events.newListener)this.emit("newListener",e,r(t.listener)?t.listener:t);if(!this._events[e])this._events[e]=t;else if(o(this._events[e]))this._events[e].push(t);else this._events[e]=[this._events[e],t];if(o(this._events[e])&&!this._events[e].warned){if(!a(this._maxListeners)){n=this._maxListeners}else{n=i.defaultMaxListeners}if(n&&n>0&&this._events[e].length>n){this._events[e].warned=true;console.error("(node) warning: possible EventEmitter memory "+"leak detected. %d listeners added. "+"Use emitter.setMaxListeners() to increase limit.",this._events[e].length);if(typeof console.trace==="function"){console.trace()}}}return this};i.prototype.on=i.prototype.addListener;i.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=false;function i(){this.removeListener(e,i);if(!n){n=true;t.apply(this,arguments)}}i.listener=t;this.on(e,i);return this};i.prototype.removeListener=function(e,t){var n,i,s,a;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;n=this._events[e];s=n.length;i=-1;if(n===t||r(n.listener)&&n.listener===t){delete this._events[e];if(this._events.removeListener)this.emit("removeListener",e,t)}else if(o(n)){for(a=s;a-- >0;){if(n[a]===t||n[a].listener&&n[a].listener===t){i=a;break}}if(i<0)return this;if(n.length===1){n.length=0;delete this._events[e]}else{n.splice(i,1)}if(this._events.removeListener)this.emit("removeListener",e,t)}return this};i.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener){if(arguments.length===0)this._events={};else if(this._events[e])delete this._events[e];return this}if(arguments.length===0){for(t in this._events){if(t==="removeListener")continue;this.removeAllListeners(t)}this.removeAllListeners("removeListener");this._events={};return this}n=this._events[e];if(r(n)){this.removeListener(e,n)}else if(n){while(n.length)this.removeListener(e,n[n.length-1])}delete this._events[e];return this};i.prototype.listeners=function(e){var t;if(!this._events||!this._events[e])t=[];else if(r(this._events[e]))t=[this._events[e]];else t=this._events[e].slice();return t};i.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;else if(t)return t.length}return 0};i.listenerCount=function(e,t){return e.listenerCount(t)};function r(e){return typeof e==="function"}function s(e){return typeof e==="number"}function o(e){return typeof e==="object"&&e!==null}function a(e){return e===void 0}},{}],3:[function(e,t,n){var i=t.exports={};var r=[];var s=false;var o;var a=-1;function l(){if(!s||!o){return}s=false;if(o.length){r=o.concat(r)}else{a=-1}if(r.length){f()}}function f(){if(s){return}var e=setTimeout(l);s=true;var t=r.length;while(t){o=r;r=[];while(++a<t){if(o){o[a].run()}}a=-1;t=r.length}o=null;s=false;clearTimeout(e)}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1){for(var n=1;n<arguments.length;n++){t[n-1]=arguments[n]}}r.push(new c(e,t));if(r.length===1&&!s){setTimeout(f,0)}};function c(e,t){this.fun=e;this.array=t}c.prototype.run=function(){this.fun.apply(null,this.array)};i.title="browser";i.browser=true;i.env={};i.argv=[];i.version="";i.versions={};function u(){}i.on=u;i.addListener=u;i.once=u;i.off=u;i.removeListener=u;i.removeAllListeners=u;i.emit=u;i.binding=function(e){throw new Error("process.binding is not supported")};i.cwd=function(){return"/"};i.chdir=function(e){throw new Error("process.chdir is not supported")};i.umask=function(){return 0}},{}],4:[function(e,t,n){"use strict";function i(){return Object.create(i.prototype)}t.exports=i;i.SYNC=-Infinity;i.init=function s(){Object.defineProperty(this,"__ngev",{value:{nice:i.SYNC,interruptible:false,recursion:0,contexts:{},events:{error:[],interrupt:[],newListener:[],removeListener:[]}}})};i.filterOutCallback=function(e,t){return e!==t};i.prototype.addListener=function o(e,t,n){var r={};if(!this.__ngev){i.init.call(this)}if(!this.__ngev.events[e]){this.__ngev.events[e]=[]}if(!e||typeof e!=="string"){throw new TypeError(".addListener(): argument #0 should be a non-empty string")}if(typeof t!=="function"){n=t;t=undefined}if(!n||typeof n!=="object"){n={}}r.fn=t||n.fn;r.id=typeof n.id==="string"?n.id:r.fn;r.once=!!n.once;r.async=!!n.async;r.nice=n.nice!==undefined?Math.floor(n.nice):i.SYNC;r.context=typeof n.context==="string"?n.context:null;if(typeof r.fn!=="function"){throw new TypeError(".addListener(): a function or an object with a 'fn' property which value is a function should be provided")}if(r.context&&typeof r.context==="string"&&!this.__ngev.contexts[r.context]){this.addListenerContext(r.context)}r.event=e;if(this.__ngev.events.newListener.length){this.emit("newListener",[r])}this.__ngev.events[e].push(r);return this};i.prototype.on=i.prototype.addListener;i.prototype.once=function a(e,t,n){if(t&&typeof t==="object"){t.once=true}else if(n&&typeof n==="object"){n.once=true}else{n={once:true}}return this.addListener(e,t,n)};i.prototype.removeListener=function l(e,t){var n,r,s=[],o=[];if(!e||typeof e!=="string"){throw new TypeError(".removeListener(): argument #0 should be a non-empty string")}if(!this.__ngev){i.init.call(this)}if(!this.__ngev.events[e]){this.__ngev.events[e]=[]}r=this.__ngev.events[e].length;for(n=0;n<r;n++){if(this.__ngev.events[e][n].id===t){o.push(this.__ngev.events[e][n])}else{s.push(this.__ngev.events[e][n])}}this.__ngev.events[e]=s;if(o.length&&this.__ngev.events.removeListener.length){this.emit("removeListener",o)}return this};i.prototype.off=i.prototype.removeListener;i.prototype.removeAllListeners=function f(e){var t;if(!this.__ngev){i.init.call(this)}if(e){if(!e||typeof e!=="string"){throw new TypeError(".removeAllListener(): argument #0 should be undefined or a non-empty string")}if(!this.__ngev.events[e]){this.__ngev.events[e]=[]}t=this.__ngev.events[e];this.__ngev.events[e]=[];if(t.length&&this.__ngev.events.removeListener.length){this.emit("removeListener",t)}}else{this.__ngev.events={}}return this};i.listenerWrapper=function c(e,t,n){var r,s;if(t.interrupt){return}if(e.async){if(n){s=n.serial;n.ready=!s}r=e.fn.apply(undefined,t.args.concat(function(n){t.listenersDone++;if(n&&t.emitter.__ngev.interruptible&&!t.interrupt&&t.name!=="interrupt"){t.interrupt=n;if(t.callback){t.callback(t.interrupt,t);delete t.callback}t.emitter.emit("interrupt",t.interrupt)}else if(t.listenersDone>=t.listeners&&t.callback){t.callback(undefined,t);delete t.callback}if(s){i.processQueue.call(t.emitter,e.context,true)}}))}else{r=e.fn.apply(undefined,t.args);t.listenersDone++}if(r&&t.emitter.__ngev.interruptible&&!t.interrupt&&t.name!=="interrupt"){t.interrupt=r;if(t.callback){t.callback(t.interrupt,t);delete t.callback}t.emitter.emit("interrupt",t.interrupt)}else if(t.listenersDone>=t.listeners&&t.callback){t.callback(undefined,t);delete t.callback}};var r=0;i.prototype.emit=function u(){var e,t,n=0,s,o,a,l,f,c=[];s={emitter:this,id:r++,name:null,args:null,nice:null,interrupt:null,listeners:null,listenersDone:0,callback:null};if(!this.__ngev){i.init.call(this)}if(typeof arguments[0]==="number"){s.nice=Math.floor(arguments[0]);s.name=arguments[1];if(!s.name||typeof s.name!=="string"){throw new TypeError(".emit(): when argument #0 is a number, argument #1 should be a non-empty string")}if(typeof arguments[arguments.length-1]==="function"){s.callback=arguments[arguments.length-1];s.args=Array.prototype.slice.call(arguments,2,-1)}else{s.args=Array.prototype.slice.call(arguments,2)}}else{s.nice=this.__ngev.nice;s.name=arguments[0];if(!s.name||typeof s.name!=="string"){throw new TypeError(".emit(): argument #0 should be an number or a non-empty string")}s.args=Array.prototype.slice.call(arguments,1);if(typeof arguments[arguments.length-1]==="function"){s.callback=arguments[arguments.length-1];s.args=Array.prototype.slice.call(arguments,1,-1)}else{s.args=Array.prototype.slice.call(arguments,1)}}if(!this.__ngev.events[s.name]){this.__ngev.events[s.name]=[]}s.listeners=this.__ngev.events[s.name].length;this.__ngev.recursion++;f=this.__ngev.events[s.name].slice();for(e=0,t=f.length;e<t;e++){n++;o=f[e];a=o.context&&this.__ngev.contexts[o.context];if(a&&a.status===i.CONTEXT_DISABLED){continue}if(a){l=Math.max(s.nice,o.nice,a.nice)}else{l=Math.max(s.nice,o.nice)}if(o.once){this.__ngev.events[s.name]=this.__ngev.events[s.name].filter(i.filterOutCallback.bind(undefined,o));c.push(o)}if(a&&(a.status===i.CONTEXT_QUEUED||!a.ready)){a.queue.push({event:s,listener:o,nice:l})}else{try{if(l<0){if(this.__ngev.recursion>=-l){setImmediate(i.listenerWrapper.bind(this,o,s,a))}else{i.listenerWrapper.call(this,o,s,a)}}else{setTimeout(i.listenerWrapper.bind(this,o,s,a),l)}}catch(u){this.__ngev.recursion--;throw u}}}this.__ngev.recursion--;if(c.length&&this.__ngev.events.removeListener.length){this.emit("removeListener",c)}if(!n){if(s.name==="error"){if(arguments[1]){throw arguments[1]}else{throw Error("Uncaught, unspecified 'error' event.")}}if(s.callback){s.callback(undefined,s);delete s.callback}}return s};i.prototype.listeners=function p(e){if(!e||typeof e!=="string"){throw new TypeError(".listeners(): argument #0 should be a non-empty string")}if(!this.__ngev){i.init.call(this)}if(!this.__ngev.events[e]){this.__ngev.events[e]=[]}return this.__ngev.events[e].slice()};i.listenerCount=function(e,t){if(!e||!(e instanceof i)){throw new TypeError(".listenerCount(): argument #0 should be an instance of NextGenEvents")}return e.listenerCount(t)};i.prototype.listenerCount=function(e){if(!e||typeof e!=="string"){throw new TypeError(".listenerCount(): argument #1 should be a non-empty string")}if(!this.__ngev){i.init.call(this)}if(!this.__ngev.events[e]){this.__ngev.events[e]=[]}return this.__ngev.events[e].length};i.prototype.setNice=function h(e){if(!this.__ngev){i.init.call(this)}this.__ngev.nice=Math.floor(+e||0)};i.prototype.setInterruptible=function v(e){if(!this.__ngev){i.init.call(this)}this.__ngev.interruptible=!!e};i.prototype.setMaxListeners=function(){};i.noop=function(){};i.CONTEXT_ENABLED=0;i.CONTEXT_DISABLED=1;i.CONTEXT_QUEUED=2;i.prototype.addListenerContext=function _(e,t){if(!this.__ngev){i.init.call(this)}if(!e||typeof e!=="string"){throw new TypeError(".addListenerContext(): argument #0 should be a non-empty string")}if(!t||typeof t!=="object"){t={}}if(!this.__ngev.contexts[e]){this.__ngev.contexts[e]=Object.create(i.prototype);this.__ngev.contexts[e].nice=i.SYNC;this.__ngev.contexts[e].ready=true;this.__ngev.contexts[e].status=i.CONTEXT_ENABLED;this.__ngev.contexts[e].serial=false;this.__ngev.contexts[e].queue=[]}if(t.nice!==undefined){this.__ngev.contexts[e].nice=Math.floor(t.nice)}if(t.status!==undefined){this.__ngev.contexts[e].status=t.status}if(t.serial!==undefined){this.__ngev.contexts[e].serial=!!t.serial}return this};i.prototype.disableListenerContext=function d(e){if(!this.__ngev){i.init.call(this)}if(!e||typeof e!=="string"){throw new TypeError(".disableListenerContext(): argument #0 should be a non-empty string")}if(!this.__ngev.contexts[e]){this.addListenerContext(e)}this.__ngev.contexts[e].status=i.CONTEXT_DISABLED;return this};i.prototype.enableListenerContext=function g(e){if(!this.__ngev){i.init.call(this)}if(!e||typeof e!=="string"){throw new TypeError(".enableListenerContext(): argument #0 should be a non-empty string")}if(!this.__ngev.contexts[e]){this.addListenerContext(e)}this.__ngev.contexts[e].status=i.CONTEXT_ENABLED;if(this.__ngev.contexts[e].queue.length>0){i.processQueue.call(this,e)}return this};i.prototype.queueListenerContext=function y(e){if(!this.__ngev){i.init.call(this)}if(!e||typeof e!=="string"){throw new TypeError(".queueListenerContext(): argument #0 should be a non-empty string")}if(!this.__ngev.contexts[e]){this.addListenerContext(e)}this.__ngev.contexts[e].status=i.CONTEXT_QUEUED;return this};i.prototype.serializeListenerContext=function m(e,t){if(!this.__ngev){i.init.call(this)}if(!e||typeof e!=="string"){throw new TypeError(".serializeListenerContext(): argument #0 should be a non-empty string")}if(!this.__ngev.contexts[e]){this.addListenerContext(e)}this.__ngev.contexts[e].serial=t===undefined?true:!!t;return this};i.prototype.setListenerContextNice=function L(e,t){if(!this.__ngev){i.init.call(this)}if(!e||typeof e!=="string"){throw new TypeError(".setListenerContextNice(): argument #0 should be a non-empty string")}if(!this.__ngev.contexts[e]){this.addListenerContext(e)}this.__ngev.contexts[e].nice=Math.floor(t);return this};i.prototype.destroyListenerContext=function x(e){var t,n,r,s,o=[];if(!e||typeof e!=="string"){throw new TypeError(".disableListenerContext(): argument #0 should be a non-empty string")}if(!this.__ngev){i.init.call(this)}for(r in this.__ngev.events){s=null;n=this.__ngev.events[r].length;for(t=0;t<n;t++){if(this.__ngev.events[r][t].context===e){s=[];o.push(this.__ngev.events[r][t])}else if(s){s.push(this.__ngev.events[r][t])}}if(s){this.__ngev.events[r]=s}}if(this.__ngev.contexts[e]){delete this.__ngev.contexts[e]}if(o.length&&this.__ngev.events.removeListener.length){this.emit("removeListener",o)}return this};i.processQueue=function E(e,t){var n,r;if(!this.__ngev.contexts[e]){return}n=this.__ngev.contexts[e];if(t){n.ready=true}this.__ngev.recursion++;while(n.ready&&n.queue.length){r=n.queue.shift();if(r.event.interrupt){continue}try{if(r.nice<0){if(this.__ngev.recursion>=-r.nice){setImmediate(i.listenerWrapper.bind(this,r.listener,r.event,n))}else{i.listenerWrapper.call(this,r.listener,r.event,n)}}else{setTimeout(i.listenerWrapper.bind(this,r.listener,r.event,n),r.nice)}}catch(s){this.__ngev.recursion--;throw s}}this.__ngev.recursion--};i.on=i.prototype.on;i.once=i.prototype.once;i.off=i.prototype.off},{}]},{},[1])(1)}); | ||
(function(e){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=e()}else if(typeof define==="function"&&define.amd){define([],e)}else{var t;if(typeof window!=="undefined"){t=window}else if(typeof global!=="undefined"){t=global}else if(typeof self!=="undefined"){t=self}else{t=this}t.AsyncTryCatch=e()}})(function(){var e,t,n;return function i(e,t,n){function s(o,a){if(!t[o]){if(!e[o]){var l=typeof require=="function"&&require;if(!a&&l)return l(o,!0);if(r)return r(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var f=t[o]={exports:{}};e[o][0].call(f.exports,function(t){var n=e[o][1][t];return s(n?n:t)},f,f.exports,i,e,t,n)}return t[o].exports}var r=typeof require=="function"&&require;for(var o=0;o<n.length;o++)s(n[o]);return s}({1:[function(e,t,n){(function(n,i){"use strict";function s(){throw new Error("Use AsyncTryCatch.try() instead.")}t.exports=s;i.AsyncTryCatch=s;if(n.browser&&!i.setImmediate){i.setImmediate=function r(e){return setTimeout(e,0)};i.clearImmediate=function o(e){return clearTimeout(e)}}if(!i.Vanilla){i.Vanilla={};if(!i.Vanilla.setTimeout){i.Vanilla.setTimeout=setTimeout}if(!i.Vanilla.setImmediate){i.Vanilla.setImmediate=setImmediate}if(!i.Vanilla.nextTick){i.Vanilla.nextTick=n.nextTick}}s.stack=[];s.substituted=false;s.try=function a(e){var t=Object.create(s.prototype,{fn:{value:e,enumerable:true},parent:{value:s.stack[s.stack.length-1]}});return t};s.prototype.catch=function l(e){Object.defineProperties(this,{catchFn:{value:e,enumerable:true}});if(!s.substituted){s.substitute()}try{s.stack.push(this);this.fn();s.stack.pop()}catch(t){s.stack.pop();this.callCatchFn(t)}};s.prototype.callCatchFn=function c(e){if(!this.parent){this.catchFn(e);return}try{s.stack.push(this.parent);this.catchFn(e);s.stack.pop()}catch(e){s.stack.pop();this.parent.callCatchFn(e)}};s.timerWrapper=function f(e,t){var t,n,i,r=Array.prototype.slice.call(arguments,1);if(typeof t!=="function"||!s.stack.length){return e.apply(this,r)}n=s.stack[s.stack.length-1];i=function(){try{s.stack.push(n);t.apply(this,arguments);s.stack.pop()}catch(e){s.stack.pop();n.callCatchFn(e)}};r[0]=i;return e.apply(this,r)};s.addListenerWrapper=function h(e,t,n,i){var n,r,o;if(typeof n==="object"){i=n;n=i.fn;delete i.fn}if(typeof n!=="function"||!s.stack.length){return e.call(this,t,n,i)}r=s.stack[s.stack.length-1];if(this.__fnToWrapperMap){o=this.__fnToWrapperMap.get(n)}else{Object.defineProperty(this,"__fnToWrapperMap",{value:new WeakMap})}if(!o){o=function(){try{s.stack.push(r);n.apply(this,arguments);s.stack.pop()}catch(e){s.stack.pop();r.callCatchFn(e)}};this.__fnToWrapperMap.set(n,o)}return e.call(this,t,o,i)};s.removeListenerWrapper=function u(e,t,n){if(typeof n==="function"&&this.__fnToWrapperMap){n=this.__fnToWrapperMap.get(n)||n}return e.call(this,t,n)};s.setTimeout=s.timerWrapper.bind(undefined,i.Vanilla.setTimeout);s.setImmediate=s.timerWrapper.bind(undefined,i.Vanilla.setImmediate);s.nextTick=s.timerWrapper.bind(n,i.Vanilla.nextTick);s.addListener=function p(e,t){s.addListenerWrapper.call(this,s.NodeEvents.__addListener,e,t)};s.addListenerOnce=function v(e,t){s.addListenerWrapper.call(this,s.NodeEvents.__addListenerOnce,e,t)};s.removeListener=function _(e,t){s.removeListenerWrapper.call(this,s.NodeEvents.__removeListener,e,t)};s.ngevAddListener=function d(e,t,n){s.addListenerWrapper.call(this,s.NextGenEvents.on,e,t,n)};s.ngevAddListenerOnce=function g(e,t,n){s.addListenerWrapper.call(this,s.NextGenEvents.once,e,t,n)};s.ngevRemoveListener=function y(e,t){s.removeListenerWrapper.call(this,s.NextGenEvents.off,e,t)};s.substitute=function m(){s.substituted=true;i.setTimeout=s.setTimeout;i.setImmediate=s.setTimeout;n.nextTick=s.nextTick;try{s.NodeEvents=i.EventEmitter||e("events")}catch(t){}try{s.NextGenEvents=i.NextGenEvents||e("nextgen-events")}catch(t){}if(s.NodeEvents){if(!s.NodeEvents.__addListener){s.NodeEvents.__addListener=s.NodeEvents.prototype.on}if(!s.NodeEvents.__addListenerOnce){s.NodeEvents.__addListenerOnce=s.NodeEvents.prototype.addListenerOnce}if(!s.NodeEvents.__removeListener){s.NodeEvents.__removeListener=s.NodeEvents.prototype.removeListener}s.NodeEvents.prototype.on=s.addListener;s.NodeEvents.prototype.addListener=s.addListener;s.NodeEvents.prototype.once=s.addListenerOnce;s.NodeEvents.prototype.removeListener=s.removeListener}if(s.NextGenEvents){s.NextGenEvents.prototype.on=s.ngevAddListener;s.NextGenEvents.prototype.addListener=s.ngevAddListener;s.NextGenEvents.prototype.once=s.ngevAddListenerOnce;s.NextGenEvents.prototype.off=s.ngevRemoveListener;s.NextGenEvents.prototype.removeListener=s.ngevRemoveListener}};s.restore=function L(){s.substituted=false;i.setTimeout=i.Vanilla.setTimeout;i.setImmediate=i.Vanilla.setImmediate;n.nextTick=i.Vanilla.nextTick;if(s.NodeEvents){s.NodeEvents.prototype.on=s.NodeEvents.__addListener;s.NodeEvents.prototype.addListener=s.NodeEvents.__addListener;s.NodeEvents.prototype.once=s.NodeEvents.__addListenerOnce;s.NodeEvents.prototype.removeListener=s.NodeEvents.__removeListener}if(s.NextGenEvents){s.NextGenEvents.prototype.on=s.NextGenEvents.on;s.NextGenEvents.prototype.addListener=s.NextGenEvents.on;s.NextGenEvents.prototype.once=s.NextGenEvents.once;s.NextGenEvents.prototype.off=s.NextGenEvents.off;s.NextGenEvents.prototype.removeListener=s.NextGenEvents.removeListener}}}).call(this,e("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{_process:3,events:2,"nextgen-events":4}],2:[function(e,t,n){function i(){this._events=this._events||{};this._maxListeners=this._maxListeners||undefined}t.exports=i;i.EventEmitter=i;i.prototype._events=undefined;i.prototype._maxListeners=undefined;i.defaultMaxListeners=10;i.prototype.setMaxListeners=function(e){if(!r(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");this._maxListeners=e;return this};i.prototype.emit=function(e){var t,n,i,r,l,c;if(!this._events)this._events={};if(e==="error"){if(!this._events.error||o(this._events.error)&&!this._events.error.length){t=arguments[1];if(t instanceof Error){throw t}throw TypeError('Uncaught, unspecified "error" event.')}}n=this._events[e];if(a(n))return false;if(s(n)){switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:r=Array.prototype.slice.call(arguments,1);n.apply(this,r)}}else if(o(n)){r=Array.prototype.slice.call(arguments,1);c=n.slice();i=c.length;for(l=0;l<i;l++)c[l].apply(this,r)}return true};i.prototype.addListener=function(e,t){var n;if(!s(t))throw TypeError("listener must be a function");if(!this._events)this._events={};if(this._events.newListener)this.emit("newListener",e,s(t.listener)?t.listener:t);if(!this._events[e])this._events[e]=t;else if(o(this._events[e]))this._events[e].push(t);else this._events[e]=[this._events[e],t];if(o(this._events[e])&&!this._events[e].warned){if(!a(this._maxListeners)){n=this._maxListeners}else{n=i.defaultMaxListeners}if(n&&n>0&&this._events[e].length>n){this._events[e].warned=true;console.error("(node) warning: possible EventEmitter memory "+"leak detected. %d listeners added. "+"Use emitter.setMaxListeners() to increase limit.",this._events[e].length);if(typeof console.trace==="function"){console.trace()}}}return this};i.prototype.on=i.prototype.addListener;i.prototype.once=function(e,t){if(!s(t))throw TypeError("listener must be a function");var n=false;function i(){this.removeListener(e,i);if(!n){n=true;t.apply(this,arguments)}}i.listener=t;this.on(e,i);return this};i.prototype.removeListener=function(e,t){var n,i,r,a;if(!s(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;n=this._events[e];r=n.length;i=-1;if(n===t||s(n.listener)&&n.listener===t){delete this._events[e];if(this._events.removeListener)this.emit("removeListener",e,t)}else if(o(n)){for(a=r;a-- >0;){if(n[a]===t||n[a].listener&&n[a].listener===t){i=a;break}}if(i<0)return this;if(n.length===1){n.length=0;delete this._events[e]}else{n.splice(i,1)}if(this._events.removeListener)this.emit("removeListener",e,t)}return this};i.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener){if(arguments.length===0)this._events={};else if(this._events[e])delete this._events[e];return this}if(arguments.length===0){for(t in this._events){if(t==="removeListener")continue;this.removeAllListeners(t)}this.removeAllListeners("removeListener");this._events={};return this}n=this._events[e];if(s(n)){this.removeListener(e,n)}else if(n){while(n.length)this.removeListener(e,n[n.length-1])}delete this._events[e];return this};i.prototype.listeners=function(e){var t;if(!this._events||!this._events[e])t=[];else if(s(this._events[e]))t=[this._events[e]];else t=this._events[e].slice();return t};i.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(s(t))return 1;else if(t)return t.length}return 0};i.listenerCount=function(e,t){return e.listenerCount(t)};function s(e){return typeof e==="function"}function r(e){return typeof e==="number"}function o(e){return typeof e==="object"&&e!==null}function a(e){return e===void 0}},{}],3:[function(e,t,n){var i=t.exports={};var s=[];var r=false;var o;var a=-1;function l(){if(!r||!o){return}r=false;if(o.length){s=o.concat(s)}else{a=-1}if(s.length){c()}}function c(){if(r){return}var e=setTimeout(l);r=true;var t=s.length;while(t){o=s;s=[];while(++a<t){if(o){o[a].run()}}a=-1;t=s.length}o=null;r=false;clearTimeout(e)}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1){for(var n=1;n<arguments.length;n++){t[n-1]=arguments[n]}}s.push(new f(e,t));if(s.length===1&&!r){setTimeout(c,0)}};function f(e,t){this.fun=e;this.array=t}f.prototype.run=function(){this.fun.apply(null,this.array)};i.title="browser";i.browser=true;i.env={};i.argv=[];i.version="";i.versions={};function h(){}i.on=h;i.addListener=h;i.once=h;i.off=h;i.removeListener=h;i.removeAllListeners=h;i.emit=h;i.binding=function(e){throw new Error("process.binding is not supported")};i.cwd=function(){return"/"};i.chdir=function(e){throw new Error("process.chdir is not supported")};i.umask=function(){return 0}},{}],4:[function(e,t,n){"use strict";function i(){return Object.create(i.prototype)}t.exports=i;i.SYNC=-Infinity;i.init=function r(){Object.defineProperty(this,"__ngev",{value:{nice:i.SYNC,interruptible:false,recursion:0,contexts:{},events:{error:[],interrupt:[],newListener:[],removeListener:[]}}})};i.filterOutCallback=function(e,t){return e!==t};i.prototype.addListener=function o(e,t,n){var s={};if(!this.__ngev){i.init.call(this)}if(!this.__ngev.events[e]){this.__ngev.events[e]=[]}if(!e||typeof e!=="string"){throw new TypeError(".addListener(): argument #0 should be a non-empty string")}if(typeof t!=="function"){n=t;t=undefined}if(!n||typeof n!=="object"){n={}}s.fn=t||n.fn;s.id=typeof n.id==="string"?n.id:s.fn;s.once=!!n.once;s.async=!!n.async;s.nice=n.nice!==undefined?Math.floor(n.nice):i.SYNC;s.context=typeof n.context==="string"?n.context:null;if(typeof s.fn!=="function"){throw new TypeError(".addListener(): a function or an object with a 'fn' property which value is a function should be provided")}if(s.context&&typeof s.context==="string"&&!this.__ngev.contexts[s.context]){this.addListenerContext(s.context)}s.event=e;if(this.__ngev.events.newListener.length){this.emit("newListener",[s])}this.__ngev.events[e].push(s);return this};i.prototype.on=i.prototype.addListener;i.prototype.once=function a(e,t,n){if(t&&typeof t==="object"){t.once=true}else if(n&&typeof n==="object"){n.once=true}else{n={once:true}}return this.addListener(e,t,n)};i.prototype.removeListener=function l(e,t){var n,s,r=[],o=[];if(!e||typeof e!=="string"){throw new TypeError(".removeListener(): argument #0 should be a non-empty string")}if(!this.__ngev){i.init.call(this)}if(!this.__ngev.events[e]){this.__ngev.events[e]=[]}s=this.__ngev.events[e].length;for(n=0;n<s;n++){if(this.__ngev.events[e][n].id===t){o.push(this.__ngev.events[e][n])}else{r.push(this.__ngev.events[e][n])}}this.__ngev.events[e]=r;if(o.length&&this.__ngev.events.removeListener.length){this.emit("removeListener",o)}return this};i.prototype.off=i.prototype.removeListener;i.prototype.removeAllListeners=function c(e){var t;if(!this.__ngev){i.init.call(this)}if(e){if(!e||typeof e!=="string"){throw new TypeError(".removeAllListener(): argument #0 should be undefined or a non-empty string")}if(!this.__ngev.events[e]){this.__ngev.events[e]=[]}t=this.__ngev.events[e];this.__ngev.events[e]=[];if(t.length&&this.__ngev.events.removeListener.length){this.emit("removeListener",t)}}else{this.__ngev.events={}}return this};i.listenerWrapper=function f(e,t,n){var s,r;if(t.interrupt){return}if(e.async){if(n){r=n.serial;n.ready=!r}s=e.fn.apply(undefined,t.args.concat(function(n){t.listenersDone++;if(n&&t.emitter.__ngev.interruptible&&!t.interrupt&&t.name!=="interrupt"){t.interrupt=n;if(t.callback){t.callback(t.interrupt,t);delete t.callback}t.emitter.emit("interrupt",t.interrupt)}else if(t.listenersDone>=t.listeners&&t.callback){t.callback(undefined,t);delete t.callback}if(r){i.processQueue.call(t.emitter,e.context,true)}}))}else{s=e.fn.apply(undefined,t.args);t.listenersDone++}if(s&&t.emitter.__ngev.interruptible&&!t.interrupt&&t.name!=="interrupt"){t.interrupt=s;if(t.callback){t.callback(t.interrupt,t);delete t.callback}t.emitter.emit("interrupt",t.interrupt)}else if(t.listenersDone>=t.listeners&&t.callback){t.callback(undefined,t);delete t.callback}};var s=0;i.prototype.emit=function h(){var e,t,n=0,r,o,a,l,c,f=[];r={emitter:this,id:s++,name:null,args:null,nice:null,interrupt:null,listeners:null,listenersDone:0,callback:null};if(!this.__ngev){i.init.call(this)}if(typeof arguments[0]==="number"){r.nice=Math.floor(arguments[0]);r.name=arguments[1];if(!r.name||typeof r.name!=="string"){throw new TypeError(".emit(): when argument #0 is a number, argument #1 should be a non-empty string")}if(typeof arguments[arguments.length-1]==="function"){r.callback=arguments[arguments.length-1];r.args=Array.prototype.slice.call(arguments,2,-1)}else{r.args=Array.prototype.slice.call(arguments,2)}}else{r.nice=this.__ngev.nice;r.name=arguments[0];if(!r.name||typeof r.name!=="string"){throw new TypeError(".emit(): argument #0 should be an number or a non-empty string")}r.args=Array.prototype.slice.call(arguments,1);if(typeof arguments[arguments.length-1]==="function"){r.callback=arguments[arguments.length-1];r.args=Array.prototype.slice.call(arguments,1,-1)}else{r.args=Array.prototype.slice.call(arguments,1)}}if(!this.__ngev.events[r.name]){this.__ngev.events[r.name]=[]}r.listeners=this.__ngev.events[r.name].length;this.__ngev.recursion++;c=this.__ngev.events[r.name].slice();for(e=0,t=c.length;e<t;e++){n++;o=c[e];a=o.context&&this.__ngev.contexts[o.context];if(a&&a.status===i.CONTEXT_DISABLED){continue}if(a){l=Math.max(r.nice,o.nice,a.nice)}else{l=Math.max(r.nice,o.nice)}if(o.once){this.__ngev.events[r.name]=this.__ngev.events[r.name].filter(i.filterOutCallback.bind(undefined,o));f.push(o)}if(a&&(a.status===i.CONTEXT_QUEUED||!a.ready)){a.queue.push({event:r,listener:o,nice:l})}else{try{if(l<0){if(this.__ngev.recursion>=-l){setImmediate(i.listenerWrapper.bind(this,o,r,a))}else{i.listenerWrapper.call(this,o,r,a)}}else{setTimeout(i.listenerWrapper.bind(this,o,r,a),l)}}catch(h){this.__ngev.recursion--;throw h}}}this.__ngev.recursion--;if(f.length&&this.__ngev.events.removeListener.length){this.emit("removeListener",f)}if(!n){if(r.name==="error"){if(arguments[1]){throw arguments[1]}else{throw Error("Uncaught, unspecified 'error' event.")}}if(r.callback){r.callback(undefined,r);delete r.callback}}return r};i.prototype.listeners=function u(e){if(!e||typeof e!=="string"){throw new TypeError(".listeners(): argument #0 should be a non-empty string")}if(!this.__ngev){i.init.call(this)}if(!this.__ngev.events[e]){this.__ngev.events[e]=[]}return this.__ngev.events[e].slice()};i.listenerCount=function(e,t){if(!e||!(e instanceof i)){throw new TypeError(".listenerCount(): argument #0 should be an instance of NextGenEvents")}return e.listenerCount(t)};i.prototype.listenerCount=function(e){if(!e||typeof e!=="string"){throw new TypeError(".listenerCount(): argument #1 should be a non-empty string")}if(!this.__ngev){i.init.call(this)}if(!this.__ngev.events[e]){this.__ngev.events[e]=[]}return this.__ngev.events[e].length};i.prototype.setNice=function p(e){if(!this.__ngev){i.init.call(this)}this.__ngev.nice=Math.floor(+e||0)};i.prototype.setInterruptible=function v(e){if(!this.__ngev){i.init.call(this)}this.__ngev.interruptible=!!e};i.prototype.setMaxListeners=function(){};i.noop=function(){};i.CONTEXT_ENABLED=0;i.CONTEXT_DISABLED=1;i.CONTEXT_QUEUED=2;i.prototype.addListenerContext=function _(e,t){if(!this.__ngev){i.init.call(this)}if(!e||typeof e!=="string"){throw new TypeError(".addListenerContext(): argument #0 should be a non-empty string")}if(!t||typeof t!=="object"){t={}}if(!this.__ngev.contexts[e]){this.__ngev.contexts[e]=Object.create(i.prototype);this.__ngev.contexts[e].nice=i.SYNC;this.__ngev.contexts[e].ready=true;this.__ngev.contexts[e].status=i.CONTEXT_ENABLED;this.__ngev.contexts[e].serial=false;this.__ngev.contexts[e].queue=[]}if(t.nice!==undefined){this.__ngev.contexts[e].nice=Math.floor(t.nice)}if(t.status!==undefined){this.__ngev.contexts[e].status=t.status}if(t.serial!==undefined){this.__ngev.contexts[e].serial=!!t.serial}return this};i.prototype.disableListenerContext=function d(e){if(!this.__ngev){i.init.call(this)}if(!e||typeof e!=="string"){throw new TypeError(".disableListenerContext(): argument #0 should be a non-empty string")}if(!this.__ngev.contexts[e]){this.addListenerContext(e)}this.__ngev.contexts[e].status=i.CONTEXT_DISABLED;return this};i.prototype.enableListenerContext=function g(e){if(!this.__ngev){i.init.call(this)}if(!e||typeof e!=="string"){throw new TypeError(".enableListenerContext(): argument #0 should be a non-empty string")}if(!this.__ngev.contexts[e]){this.addListenerContext(e)}this.__ngev.contexts[e].status=i.CONTEXT_ENABLED;if(this.__ngev.contexts[e].queue.length>0){i.processQueue.call(this,e)}return this};i.prototype.queueListenerContext=function y(e){if(!this.__ngev){i.init.call(this)}if(!e||typeof e!=="string"){throw new TypeError(".queueListenerContext(): argument #0 should be a non-empty string")}if(!this.__ngev.contexts[e]){this.addListenerContext(e)}this.__ngev.contexts[e].status=i.CONTEXT_QUEUED;return this};i.prototype.serializeListenerContext=function m(e,t){if(!this.__ngev){i.init.call(this)}if(!e||typeof e!=="string"){throw new TypeError(".serializeListenerContext(): argument #0 should be a non-empty string")}if(!this.__ngev.contexts[e]){this.addListenerContext(e)}this.__ngev.contexts[e].serial=t===undefined?true:!!t;return this};i.prototype.setListenerContextNice=function L(e,t){if(!this.__ngev){i.init.call(this)}if(!e||typeof e!=="string"){throw new TypeError(".setListenerContextNice(): argument #0 should be a non-empty string")}if(!this.__ngev.contexts[e]){this.addListenerContext(e)}this.__ngev.contexts[e].nice=Math.floor(t);return this};i.prototype.destroyListenerContext=function x(e){var t,n,s,r,o=[];if(!e||typeof e!=="string"){throw new TypeError(".disableListenerContext(): argument #0 should be a non-empty string")}if(!this.__ngev){i.init.call(this)}for(s in this.__ngev.events){r=null;n=this.__ngev.events[s].length;for(t=0;t<n;t++){if(this.__ngev.events[s][t].context===e){r=[];o.push(this.__ngev.events[s][t])}else if(r){r.push(this.__ngev.events[s][t])}}if(r){this.__ngev.events[s]=r}}if(this.__ngev.contexts[e]){delete this.__ngev.contexts[e]}if(o.length&&this.__ngev.events.removeListener.length){this.emit("removeListener",o)}return this};i.processQueue=function E(e,t){var n,s;if(!this.__ngev.contexts[e]){return}n=this.__ngev.contexts[e];if(t){n.ready=true}this.__ngev.recursion++;while(n.ready&&n.queue.length){s=n.queue.shift();if(s.event.interrupt){continue}try{if(s.nice<0){if(this.__ngev.recursion>=-s.nice){setImmediate(i.listenerWrapper.bind(this,s.listener,s.event,n))}else{i.listenerWrapper.call(this,s.listener,s.event,n)}}else{setTimeout(i.listenerWrapper.bind(this,s.listener,s.event,n),s.nice)}}catch(r){this.__ngev.recursion--;throw r}}this.__ngev.recursion--};i.on=i.prototype.on;i.once=i.prototype.once;i.off=i.prototype.off},{}]},{},[1])(1)}); |
@@ -37,21 +37,10 @@ /* | ||
// First, get Node.js core Events module if possible and check if NextGen Events is part of this project | ||
if ( ! process.browser ) | ||
if ( process.browser && ! global.setImmediate ) | ||
{ | ||
AsyncTryCatch.NodeEvents = require( 'events' ) ; | ||
try { | ||
AsyncTryCatch.NextGenEvents = require( 'nextgen-events' ) ; | ||
} catch ( error ) {} | ||
global.setImmediate = function setImmediate( fn ) { return setTimeout( fn , 0 ) ; } ; | ||
global.clearImmediate = function clearImmediate( timer ) { return clearTimeout( timer ) ; } ; | ||
} | ||
else | ||
{ | ||
if ( ! global.setImmediate ) | ||
{ | ||
global.setImmediate = function setImmediate( fn ) { return setTimeout( fn , 0 ) ; } ; | ||
global.clearImmediate = function clearImmediate( timer ) { return clearTimeout( timer ) ; } ; | ||
} | ||
} | ||
if ( ! global.Vanilla ) | ||
@@ -128,17 +117,50 @@ { | ||
AsyncTryCatch.addListenerWrapper = function addListenerWrapper( originalMethod , listenerIndex , listenerKey ) | ||
// for setTimeout(), setImmediate(), process.nextTick() | ||
AsyncTryCatch.timerWrapper = function timerWrapper( originalMethod , fn ) | ||
{ | ||
var fn , context , wrapperFn , | ||
args = Array.prototype.slice.call( arguments , 3 ) ; | ||
args = Array.prototype.slice.call( arguments , 1 ) ; | ||
if ( listenerIndex < 0 ) { listenerIndex = args.length - listenerIndex ; } | ||
if ( typeof fn !== 'function' || ! AsyncTryCatch.stack.length ) | ||
{ | ||
return originalMethod.apply( this , args ) ; | ||
} | ||
fn = args[ listenerIndex ] ; | ||
context = AsyncTryCatch.stack[ AsyncTryCatch.stack.length - 1 ] ; | ||
wrapperFn = function() { | ||
try { | ||
AsyncTryCatch.stack.push( context ) ; | ||
fn.apply( this , arguments ) ; | ||
AsyncTryCatch.stack.pop() ; | ||
} | ||
catch ( error ) { | ||
AsyncTryCatch.stack.pop() ; | ||
context.callCatchFn( error ) ; | ||
} | ||
} ; | ||
args[ 0 ] = wrapperFn ; | ||
return originalMethod.apply( this , args ) ; | ||
} ; | ||
// for Node-EventEmitter-compatible .addListener() | ||
AsyncTryCatch.addListenerWrapper = function addListenerWrapper( originalMethod , eventName , fn , options ) | ||
{ | ||
var fn , context , wrapperFn ; | ||
// NextGen event compatibility | ||
if ( typeof fn !== 'function' && listenerKey ) { fn = fn[ listenerKey ] ; } | ||
if ( typeof fn === 'object' ) | ||
{ | ||
options = fn ; | ||
fn = options.fn ; | ||
delete options.fn ; | ||
} | ||
if ( typeof fn !== 'function' || ! AsyncTryCatch.stack.length ) | ||
{ | ||
return originalMethod.apply( this , args ) ; | ||
return originalMethod.call( this , eventName , fn , options ) ; | ||
} | ||
@@ -148,16 +170,12 @@ | ||
// This method cover setTimeout(), setImmediate() and process.nextTick() | ||
if ( this ) | ||
// Assume that the function is only wrapped once per eventEmitter | ||
if ( this.__fnToWrapperMap ) | ||
{ | ||
// Assume that the function is only wrapped once per eventEmitter | ||
if ( this.__fnToWrapperMap ) | ||
{ | ||
wrapperFn = this.__fnToWrapperMap.get( fn ) ; | ||
} | ||
else | ||
{ | ||
// Create the map, make it non-enumerable | ||
Object.defineProperty( this , '__fnToWrapperMap', { value: new WeakMap() } ) ; | ||
} | ||
wrapperFn = this.__fnToWrapperMap.get( fn ) ; | ||
} | ||
else | ||
{ | ||
// Create the map, make it non-enumerable | ||
Object.defineProperty( this , '__fnToWrapperMap', { value: new WeakMap() } ) ; | ||
} | ||
@@ -178,8 +196,6 @@ if ( ! wrapperFn ) | ||
if ( this ) { this.__fnToWrapperMap.set( fn , wrapperFn ) ; } | ||
this.__fnToWrapperMap.set( fn , wrapperFn ) ; | ||
} | ||
args[ listenerIndex ] = wrapperFn ; | ||
return originalMethod.apply( this , args ) ; | ||
return originalMethod.call( this , eventName , wrapperFn , options ) ; | ||
} ; | ||
@@ -189,22 +205,12 @@ | ||
AsyncTryCatch.removeListenerWrapper = function removeListenerWrapper( originalMethod , listenerIndex , listenerKey ) | ||
AsyncTryCatch.removeListenerWrapper = function removeListenerWrapper( originalMethod , eventName , fn ) | ||
{ | ||
var fn , context , wrapperFn , | ||
args = Array.prototype.slice.call( arguments , 3 ) ; | ||
if ( listenerIndex < 0 ) { listenerIndex = args.length - listenerIndex ; } | ||
fn = args[ listenerIndex ] ; | ||
//console.log( 'fn:' , fn ) ; | ||
// NextGen event compatibility | ||
//if ( typeof fn !== 'function' && listenerKey ) { fn = fn[ listenerKey ] ; } | ||
// 'this' is always defined here | ||
if ( typeof fn === 'function' && this.__fnToWrapperMap ) | ||
{ | ||
args[ listenerIndex ] = this.__fnToWrapperMap.get( fn ) || fn ; | ||
fn = this.__fnToWrapperMap.get( fn ) || fn ; | ||
} | ||
return originalMethod.apply( this , args ) ; | ||
return originalMethod.call( this , eventName , fn ) ; | ||
} ; | ||
@@ -214,43 +220,40 @@ | ||
AsyncTryCatch.setTimeout = AsyncTryCatch.addListenerWrapper.bind( undefined , global.Vanilla.setTimeout , 0 , null ) ; | ||
AsyncTryCatch.setImmediate = AsyncTryCatch.addListenerWrapper.bind( undefined , global.Vanilla.setImmediate , 0 , null ) ; | ||
AsyncTryCatch.setTimeout = AsyncTryCatch.timerWrapper.bind( undefined , global.Vanilla.setTimeout ) ; | ||
AsyncTryCatch.setImmediate = AsyncTryCatch.timerWrapper.bind( undefined , global.Vanilla.setImmediate ) ; | ||
AsyncTryCatch.nextTick = AsyncTryCatch.timerWrapper.bind( process , global.Vanilla.nextTick ) ; | ||
// DO NOT BIND process as 'this', it is not mandatory for nextTick() to have a 'this' context, | ||
// and furthermore the lib would assume that we are in a real addListener() use-case | ||
AsyncTryCatch.nextTick = AsyncTryCatch.addListenerWrapper.bind( undefined , global.Vanilla.nextTick , 0 , null ) ; | ||
// NodeEvents on()/addListener() replacement | ||
AsyncTryCatch.addListener = function addListener() | ||
AsyncTryCatch.addListener = function addListener( eventName , fn ) | ||
{ | ||
AsyncTryCatch.addListenerWrapper.apply( this , [ AsyncTryCatch.NodeEvents.__addListener , 1 , null ].concat( Array.from( arguments ) ) ) ; | ||
AsyncTryCatch.addListenerWrapper.call( this , AsyncTryCatch.NodeEvents.__addListener , eventName , fn ) ; | ||
} ; | ||
// NodeEvents once() replacement | ||
AsyncTryCatch.addListenerOnce = function addListenerOnce() | ||
AsyncTryCatch.addListenerOnce = function addListenerOnce( eventName , fn ) | ||
{ | ||
AsyncTryCatch.addListenerWrapper.apply( this , [ AsyncTryCatch.NodeEvents.__addListenerOnce , 1 , null ].concat( Array.from( arguments ) ) ) ; | ||
AsyncTryCatch.addListenerWrapper.call( this , AsyncTryCatch.NodeEvents.__addListenerOnce , eventName , fn ) ; | ||
} ; | ||
// NodeEvents removeListener() replacement | ||
AsyncTryCatch.removeListener = function removeListener() | ||
AsyncTryCatch.removeListener = function removeListener( eventName , fn ) | ||
{ | ||
AsyncTryCatch.removeListenerWrapper.apply( this , [ AsyncTryCatch.NodeEvents.__removeListener , 1 , null ].concat( Array.from( arguments ) ) ) ; | ||
AsyncTryCatch.removeListenerWrapper.call( this , AsyncTryCatch.NodeEvents.__removeListener , eventName , fn ) ; | ||
} ; | ||
// NextGen Events on()/addListener() replacement | ||
AsyncTryCatch.ngevAddListener = function ngevAddListener() | ||
AsyncTryCatch.ngevAddListener = function ngevAddListener( eventName , fn , options ) | ||
{ | ||
AsyncTryCatch.addListenerWrapper.apply( this , [ AsyncTryCatch.NextGenEvents.on , 1 , 'fn' ].concat( Array.from( arguments ) ) ) ; | ||
AsyncTryCatch.addListenerWrapper.call( this , AsyncTryCatch.NextGenEvents.on , eventName , fn , options ) ; | ||
} ; | ||
// NextGen Events once() replacement | ||
AsyncTryCatch.ngevAddListenerOnce = function ngevAddListenerOnce() | ||
AsyncTryCatch.ngevAddListenerOnce = function ngevAddListenerOnce( eventName , fn , options ) | ||
{ | ||
AsyncTryCatch.addListenerWrapper.apply( this , [ AsyncTryCatch.NextGenEvents.once , 1 , 'fn' ].concat( Array.from( arguments ) ) ) ; | ||
AsyncTryCatch.addListenerWrapper.call( this , AsyncTryCatch.NextGenEvents.once , eventName , fn , options ) ; | ||
} ; | ||
// NextGen Events off()/removeListener() replacement | ||
AsyncTryCatch.ngevRemoveListener = function ngevRemoveListener() | ||
AsyncTryCatch.ngevRemoveListener = function ngevRemoveListener( eventName , fn ) | ||
{ | ||
AsyncTryCatch.removeListenerWrapper.apply( this , [ AsyncTryCatch.NextGenEvents.off , 1 , 'fn' ].concat( Array.from( arguments ) ) ) ; | ||
AsyncTryCatch.removeListenerWrapper.call( this , AsyncTryCatch.NextGenEvents.off , eventName , fn ) ; | ||
} ; | ||
@@ -272,2 +275,11 @@ | ||
// Global is checked first, in case we are running into browsers | ||
try { | ||
AsyncTryCatch.NodeEvents = global.EventEmitter || require( 'events' ) ; | ||
} catch ( error ) {} | ||
try { | ||
AsyncTryCatch.NextGenEvents = global.NextGenEvents || require( 'nextgen-events' ) ; | ||
} catch ( error ) {} | ||
if ( AsyncTryCatch.NodeEvents ) | ||
@@ -325,17 +337,6 @@ { | ||
{ | ||
if ( AsyncTryCatch.NodeEvents.__addListener ) | ||
{ | ||
AsyncTryCatch.NodeEvents.prototype.on = AsyncTryCatch.NodeEvents.__addListener ; | ||
AsyncTryCatch.NodeEvents.prototype.addListener = AsyncTryCatch.NodeEvents.__addListener ; | ||
} | ||
if ( AsyncTryCatch.NodeEvents.__addListenerOnce ) | ||
{ | ||
AsyncTryCatch.NodeEvents.prototype.once = AsyncTryCatch.NodeEvents.__addListenerOnce ; | ||
} | ||
if ( AsyncTryCatch.NodeEvents.__removeListener ) | ||
{ | ||
AsyncTryCatch.NodeEvents.prototype.removeListener = AsyncTryCatch.NodeEvents.__removeListener ; | ||
} | ||
AsyncTryCatch.NodeEvents.prototype.on = AsyncTryCatch.NodeEvents.__addListener ; | ||
AsyncTryCatch.NodeEvents.prototype.addListener = AsyncTryCatch.NodeEvents.__addListener ; | ||
AsyncTryCatch.NodeEvents.prototype.once = AsyncTryCatch.NodeEvents.__addListenerOnce ; | ||
AsyncTryCatch.NodeEvents.prototype.removeListener = AsyncTryCatch.NodeEvents.__removeListener ; | ||
} | ||
@@ -342,0 +343,0 @@ |
{ | ||
"name": "async-try-catch", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "Async try catch", | ||
@@ -5,0 +5,0 @@ "main": "lib/AsyncTryCatch.js", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
343100
6213
1