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

async-try-catch

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-try-catch - npm Package Compare versions

Comparing version 0.3.6 to 0.3.7

27

browser/AsyncTryCatch.js

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

(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){
(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(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
(function (process,global){

@@ -82,2 +82,3 @@ /*

if ( ! global.Vanilla.setImmediate ) { global.Vanilla.setImmediate = setImmediate ; }
if ( ! global.Vanilla.setInterval ) { global.Vanilla.setInterval = setInterval ; }
if ( ! global.Vanilla.nextTick ) { global.Vanilla.nextTick = process.nextTick ; }

@@ -139,3 +140,3 @@

// for setTimeout(), setImmediate(), process.nextTick()
// for setTimeout(), setImmediate(), setInterval(), process.nextTick()
AsyncTryCatch.timerWrapper = function timerWrapper( originalMethod , fn , ... args ) {

@@ -155,3 +156,4 @@ var context , wrapperFn ;

global.AsyncTryCatch.stack.push( context ) ;
returnVal = fn.call( this , ... wrapperArgs ) ;
//returnVal = fn.call( this , ... wrapperArgs ) ;
returnVal = fn( ... wrapperArgs ) ;
global.AsyncTryCatch.stack.pop() ;

@@ -238,2 +240,3 @@ return returnVal ;

AsyncTryCatch.setImmediate = AsyncTryCatch.timerWrapper.bind( undefined , global.Vanilla.setImmediate ) ;
AsyncTryCatch.setInterval = AsyncTryCatch.timerWrapper.bind( undefined , global.Vanilla.setInterval ) ;
AsyncTryCatch.nextTick = AsyncTryCatch.timerWrapper.bind( process , global.Vanilla.nextTick ) ;

@@ -307,3 +310,4 @@

global.setTimeout = AsyncTryCatch.setTimeout ;
global.setImmediate = AsyncTryCatch.setTimeout ;
global.setImmediate = AsyncTryCatch.setImmediate ;
global.setInterval = AsyncTryCatch.setInterval ;
process.nextTick = AsyncTryCatch.nextTick ;

@@ -357,2 +361,3 @@

global.setImmediate = global.Vanilla.setImmediate ;
global.setInterval = global.Vanilla.setInterval ;
process.nextTick = global.Vanilla.nextTick ;

@@ -552,3 +557,7 @@

process.emit = noop;
process.prependListener = noop;
process.prependOnceListener = noop;
process.listeners = function (name) { return [] }
process.binding = function (name) {

@@ -575,7 +584,6 @@ throw new Error('process.binding is not supported');

"devDependencies": {
"browserify": "^13.1.0",
"browserify": "^16.2.2",
"doormen": "^0.7.20",
"expect.js": "^0.3.1",
"jshint": "^2.9.3",
"mocha": "^3.0.2",
"nextgen-events": "^0.12.3",
"nextgen-events": "^0.14.6",
"uglify-js-es6": "^2.8.9"

@@ -609,3 +617,4 @@ },

}
},{}]},{},[1])(1)
});
});

@@ -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 e(t,n,r){function s(i,c){if(!n[i]){if(!t[i]){var a=typeof require=="function"&&require;if(!c&&a)return a(i,!0);if(o)return o(i,!0);var y=new Error("Cannot find module '"+i+"'");throw y.code="MODULE_NOT_FOUND",y}var u=n[i]={exports:{}};t[i][0].call(u.exports,function(e){var n=t[i][1][e];return s(n?n:e)},u,u.exports,e,t,n,r)}return n[i].exports}var o=typeof require=="function"&&require;for(var i=0;i<r.length;i++)s(r[i]);return s}({1:[function(e,t,n){(function(n,r){"use strict";function s(){throw new Error("Use AsyncTryCatch.try() instead.")}t.exports=s;s.prototype.__prototypeUID__="async-try-catch/AsyncTryCatch";s.prototype.__prototypeVersion__=e("../package.json").version;if(r.AsyncTryCatch){if(r.AsyncTryCatch.prototype.__prototypeUID__==="async-try-catch/AsyncTryCatch"){var o=s.prototype.__prototypeVersion__.split(".");var i=r.AsyncTryCatch.prototype.__prototypeVersion__.split(".");if(i[0]!==o[0]||o[0]==="0"&&i[1]!==o[1]){throw new Error("Incompatible version of AsyncTryCatch already installed on global.AsyncTryCatch: "+r.AsyncTryCatch.prototype.__prototypeVersion__+", current version: "+s.prototype.__prototypeVersion__)}}else{throw new Error("Incompatible module already installed on global.AsyncTryCatch")}}else{r.AsyncTryCatch=s;r.AsyncTryCatch.stack=[];r.AsyncTryCatch.substituted=false;r.AsyncTryCatch.NextGenEvents=[]}if(n.browser&&!r.setImmediate){r.setImmediate=function e(t){return setTimeout(t,0)};r.clearImmediate=function e(t){return clearTimeout(t)}}if(!r.Vanilla){r.Vanilla={}}if(!r.Vanilla.setTimeout){r.Vanilla.setTimeout=setTimeout}if(!r.Vanilla.setImmediate){r.Vanilla.setImmediate=setImmediate}if(!r.Vanilla.nextTick){r.Vanilla.nextTick=n.nextTick}s.try=function e(t){var n=Object.create(s.prototype,{fn:{value:t,enumerable:true},parent:{value:r.AsyncTryCatch.stack[r.AsyncTryCatch.stack.length-1]}});return n};s.prototype.catch=function e(t){Object.defineProperties(this,{catchFn:{value:t,enumerable:true}});if(!r.AsyncTryCatch.substituted){s.substitute()}try{r.AsyncTryCatch.stack.push(this);this.fn();r.AsyncTryCatch.stack.pop()}catch(e){r.AsyncTryCatch.stack.pop();this.callCatchFn(e)}};s.prototype.callCatchFn=function e(t){if(!this.parent){this.catchFn(t);return}try{r.AsyncTryCatch.stack.push(this.parent);this.catchFn(t);r.AsyncTryCatch.stack.pop()}catch(e){r.AsyncTryCatch.stack.pop();this.parent.callCatchFn(e)}};s.timerWrapper=function e(t,n,...s){var o,i;if(typeof n!=="function"||!r.AsyncTryCatch.stack.length){return t.call(this,n,...s)}o=r.AsyncTryCatch.stack[r.AsyncTryCatch.stack.length-1];i=function e(...t){var s;try{r.AsyncTryCatch.stack.push(o);s=n.call(this,...t);r.AsyncTryCatch.stack.pop();return s}catch(e){r.AsyncTryCatch.stack.pop();o.callCatchFn(e)}};return t.call(this,i,...s)};s.addListenerWrapper=function e(t,n,s,o,i){var c,a,y;if(typeof s==="object"){o=s;s=o.fn;delete o.fn}if(typeof s!=="function"||!r.AsyncTryCatch.stack.length){return t.call(this,n,s,o)}c=r.AsyncTryCatch.stack[r.AsyncTryCatch.stack.length-1];if(i){y=false;a=function e(...t){var o;if(y){return}y=true;this.removeListener(n,a);try{r.AsyncTryCatch.stack.push(c);o=s.call(this,...t);r.AsyncTryCatch.stack.pop();return o}catch(e){r.AsyncTryCatch.stack.pop();c.callCatchFn(e)}}}else{a=function e(...t){var n;try{r.AsyncTryCatch.stack.push(c);n=s.call(this,...t);r.AsyncTryCatch.stack.pop();return n}catch(e){r.AsyncTryCatch.stack.pop();c.callCatchFn(e)}}}a.listener=s;return t.call(this,n,a,o)};s.setTimeout=s.timerWrapper.bind(undefined,r.Vanilla.setTimeout);s.setImmediate=s.timerWrapper.bind(undefined,r.Vanilla.setImmediate);s.nextTick=s.timerWrapper.bind(n,r.Vanilla.nextTick);s.addListener=function e(t,n){return s.addListenerWrapper.call(this,s.NodeEvents.__addListener,t,n)};s.addListenerOnce=function e(t,n){return s.addListenerWrapper.call(this,s.NodeEvents.__addListener,t,n,undefined,true)};s.removeListener=function e(t,n){return s.NodeEvents.__removeListener.call(this,t,n)};s.ngevAddListener=function e(t,n,r){if(n&&typeof n==="object"){if(n.id===undefined){n.id=n.fn}}else if(r&&typeof r==="object"){if(r.id===undefined){r.id=n}}else{r={id:n}}return s.addListenerWrapper.call(this,s.NextGenEvents[this.asyncTryCatchId].on,t,n,r)};s.ngevAddListenerOnce=function e(t,n,r){if(n&&typeof n==="object"){if(n.id===undefined){n.id=n.fn}}else if(r&&typeof r==="object"){if(r.id===undefined){r.id=n}}else{r={id:n}}return s.addListenerWrapper.call(this,s.NextGenEvents[this.asyncTryCatchId].once,t,n,r)};s.ngevRemoveListener=function e(t,n){return s.NextGenEvents[this.asyncTryCatchId].off.call(this,t,n)};s.substitute=function t(){r.AsyncTryCatch.substituted=true;r.setTimeout=s.setTimeout;r.setImmediate=s.setTimeout;n.nextTick=s.nextTick;try{s.NodeEvents=r.EventEmitter||e("events")}catch(e){}if(s.NodeEvents){if(!s.NodeEvents.__addListener){s.NodeEvents.__addListener=s.NodeEvents.prototype.on}if(!s.NodeEvents.__addListenerOnce){s.NodeEvents.__addListenerOnce=s.NodeEvents.prototype.once}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}for(var o=0;o<s.NextGenEvents.length;o++){s.NextGenEvents[o].prototype.on=s.ngevAddListener;s.NextGenEvents[o].prototype.addListener=s.ngevAddListener;s.NextGenEvents[o].prototype.once=s.ngevAddListenerOnce;s.NextGenEvents[o].prototype.off=s.ngevRemoveListener;s.NextGenEvents[o].prototype.removeListener=s.ngevRemoveListener}};s.restore=function e(){r.AsyncTryCatch.substituted=false;r.setTimeout=r.Vanilla.setTimeout;r.setImmediate=r.Vanilla.setImmediate;n.nextTick=r.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}for(var t=0;t<s.NextGenEvents.length;t++){s.NextGenEvents[t].prototype.on=s.NextGenEvents[t].on;s.NextGenEvents[t].prototype.addListener=s.NextGenEvents[t].on;s.NextGenEvents[t].prototype.once=s.NextGenEvents[t].once;s.NextGenEvents[t].prototype.off=s.NextGenEvents[t].off;s.NextGenEvents[t].prototype.removeListener=s.NextGenEvents[t].removeListener}}}).call(this,e("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"../package.json":4,_process:3,events:2}],2:[function(e,t,n){},{}],3:[function(e,t,n){var r=t.exports={};var s;var o;function i(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}(function(){try{if(typeof setTimeout==="function"){s=setTimeout}else{s=i}}catch(e){s=i}try{if(typeof clearTimeout==="function"){o=clearTimeout}else{o=c}}catch(e){o=c}})();function a(e){if(s===setTimeout){return setTimeout(e,0)}if((s===i||!s)&&setTimeout){s=setTimeout;return setTimeout(e,0)}try{return s(e,0)}catch(t){try{return s.call(null,e,0)}catch(t){return s.call(this,e,0)}}}function y(e){if(o===clearTimeout){return clearTimeout(e)}if((o===c||!o)&&clearTimeout){o=clearTimeout;return clearTimeout(e)}try{return o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}var u=[];var d=false;var l;var p=-1;function f(){if(!d||!l){return}d=false;if(l.length){u=l.concat(u)}else{p=-1}if(u.length){h()}}function h(){if(d){return}var e=a(f);d=true;var t=u.length;while(t){l=u;u=[];while(++p<t){if(l){l[p].run()}}p=-1;t=u.length}l=null;d=false;y(e)}r.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]}}u.push(new v(e,t));if(u.length===1&&!d){a(h)}};function v(e,t){this.fun=e;this.array=t}v.prototype.run=function(){this.fun.apply(null,this.array)};r.title="browser";r.browser=true;r.env={};r.argv=[];r.version="";r.versions={};function m(){}r.on=m;r.addListener=m;r.once=m;r.off=m;r.removeListener=m;r.removeAllListeners=m;r.emit=m;r.binding=function(e){throw new Error("process.binding is not supported")};r.cwd=function(){return"/"};r.chdir=function(e){throw new Error("process.chdir is not supported")};r.umask=function(){return 0}},{}],4:[function(e,t,n){t.exports={name:"async-try-catch",version:"0.3.6",description:"Async try catch",main:"lib/AsyncTryCatch.js",directories:{test:"test"},dependencies:{},devDependencies:{browserify:"^13.1.0","expect.js":"^0.3.1",jshint:"^2.9.3",mocha:"^3.0.2","nextgen-events":"^0.12.3","uglify-js-es6":"^2.8.9"},scripts:{test:"mocha -R dot"},repository:{type:"git",url:"https://github.com/cronvel/async-try-catch.git"},keywords:["async","try","catch"],author:"Cédric Ronvel",license:"MIT",bugs:{url:"https://github.com/cronvel/async-try-catch/issues"},copyright:{title:"Async Try-Catch",years:[2015,2018],owner:"Cédric Ronvel"}}},{}]},{},[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(){function e(t,n,r){function s(o,c){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!c&&a)return a(o,!0);if(i)return i(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[o]={exports:{}};t[o][0].call(u.exports,function(e){var n=t[o][1][e];return s(n||e)},u,u.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}return e}()({1:[function(e,t,n){(function(n,r){"use strict";function s(){throw new Error("Use AsyncTryCatch.try() instead.")}t.exports=s;s.prototype.__prototypeUID__="async-try-catch/AsyncTryCatch";s.prototype.__prototypeVersion__=e("../package.json").version;if(r.AsyncTryCatch){if(r.AsyncTryCatch.prototype.__prototypeUID__==="async-try-catch/AsyncTryCatch"){var i=s.prototype.__prototypeVersion__.split(".");var o=r.AsyncTryCatch.prototype.__prototypeVersion__.split(".");if(o[0]!==i[0]||i[0]==="0"&&o[1]!==i[1]){throw new Error("Incompatible version of AsyncTryCatch already installed on global.AsyncTryCatch: "+r.AsyncTryCatch.prototype.__prototypeVersion__+", current version: "+s.prototype.__prototypeVersion__)}}else{throw new Error("Incompatible module already installed on global.AsyncTryCatch")}}else{r.AsyncTryCatch=s;r.AsyncTryCatch.stack=[];r.AsyncTryCatch.substituted=false;r.AsyncTryCatch.NextGenEvents=[]}if(n.browser&&!r.setImmediate){r.setImmediate=function e(t){return setTimeout(t,0)};r.clearImmediate=function e(t){return clearTimeout(t)}}if(!r.Vanilla){r.Vanilla={}}if(!r.Vanilla.setTimeout){r.Vanilla.setTimeout=setTimeout}if(!r.Vanilla.setImmediate){r.Vanilla.setImmediate=setImmediate}if(!r.Vanilla.setInterval){r.Vanilla.setInterval=setInterval}if(!r.Vanilla.nextTick){r.Vanilla.nextTick=n.nextTick}s.try=function e(t){var n=Object.create(s.prototype,{fn:{value:t,enumerable:true},parent:{value:r.AsyncTryCatch.stack[r.AsyncTryCatch.stack.length-1]}});return n};s.prototype.catch=function e(t){Object.defineProperties(this,{catchFn:{value:t,enumerable:true}});if(!r.AsyncTryCatch.substituted){s.substitute()}try{r.AsyncTryCatch.stack.push(this);this.fn();r.AsyncTryCatch.stack.pop()}catch(e){r.AsyncTryCatch.stack.pop();this.callCatchFn(e)}};s.prototype.callCatchFn=function e(t){if(!this.parent){this.catchFn(t);return}try{r.AsyncTryCatch.stack.push(this.parent);this.catchFn(t);r.AsyncTryCatch.stack.pop()}catch(e){r.AsyncTryCatch.stack.pop();this.parent.callCatchFn(e)}};s.timerWrapper=function e(t,n,...s){var i,o;if(typeof n!=="function"||!r.AsyncTryCatch.stack.length){return t.call(this,n,...s)}i=r.AsyncTryCatch.stack[r.AsyncTryCatch.stack.length-1];o=function e(...t){var s;try{r.AsyncTryCatch.stack.push(i);s=n(...t);r.AsyncTryCatch.stack.pop();return s}catch(e){r.AsyncTryCatch.stack.pop();i.callCatchFn(e)}};return t.call(this,o,...s)};s.addListenerWrapper=function e(t,n,s,i,o){var c,a,l;if(typeof s==="object"){i=s;s=i.fn;delete i.fn}if(typeof s!=="function"||!r.AsyncTryCatch.stack.length){return t.call(this,n,s,i)}c=r.AsyncTryCatch.stack[r.AsyncTryCatch.stack.length-1];if(o){l=false;a=function e(...t){var i;if(l){return}l=true;this.removeListener(n,a);try{r.AsyncTryCatch.stack.push(c);i=s.call(this,...t);r.AsyncTryCatch.stack.pop();return i}catch(e){r.AsyncTryCatch.stack.pop();c.callCatchFn(e)}}}else{a=function e(...t){var n;try{r.AsyncTryCatch.stack.push(c);n=s.call(this,...t);r.AsyncTryCatch.stack.pop();return n}catch(e){r.AsyncTryCatch.stack.pop();c.callCatchFn(e)}}}a.listener=s;return t.call(this,n,a,i)};s.setTimeout=s.timerWrapper.bind(undefined,r.Vanilla.setTimeout);s.setImmediate=s.timerWrapper.bind(undefined,r.Vanilla.setImmediate);s.setInterval=s.timerWrapper.bind(undefined,r.Vanilla.setInterval);s.nextTick=s.timerWrapper.bind(n,r.Vanilla.nextTick);s.addListener=function e(t,n){return s.addListenerWrapper.call(this,s.NodeEvents.__addListener,t,n)};s.addListenerOnce=function e(t,n){return s.addListenerWrapper.call(this,s.NodeEvents.__addListener,t,n,undefined,true)};s.removeListener=function e(t,n){return s.NodeEvents.__removeListener.call(this,t,n)};s.ngevAddListener=function e(t,n,r){if(n&&typeof n==="object"){if(n.id===undefined){n.id=n.fn}}else if(r&&typeof r==="object"){if(r.id===undefined){r.id=n}}else{r={id:n}}return s.addListenerWrapper.call(this,s.NextGenEvents[this.asyncTryCatchId].on,t,n,r)};s.ngevAddListenerOnce=function e(t,n,r){if(n&&typeof n==="object"){if(n.id===undefined){n.id=n.fn}}else if(r&&typeof r==="object"){if(r.id===undefined){r.id=n}}else{r={id:n}}return s.addListenerWrapper.call(this,s.NextGenEvents[this.asyncTryCatchId].once,t,n,r)};s.ngevRemoveListener=function e(t,n){return s.NextGenEvents[this.asyncTryCatchId].off.call(this,t,n)};s.substitute=function t(){r.AsyncTryCatch.substituted=true;r.setTimeout=s.setTimeout;r.setImmediate=s.setImmediate;r.setInterval=s.setInterval;n.nextTick=s.nextTick;try{s.NodeEvents=r.EventEmitter||e("events")}catch(e){}if(s.NodeEvents){if(!s.NodeEvents.__addListener){s.NodeEvents.__addListener=s.NodeEvents.prototype.on}if(!s.NodeEvents.__addListenerOnce){s.NodeEvents.__addListenerOnce=s.NodeEvents.prototype.once}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}for(var i=0;i<s.NextGenEvents.length;i++){s.NextGenEvents[i].prototype.on=s.ngevAddListener;s.NextGenEvents[i].prototype.addListener=s.ngevAddListener;s.NextGenEvents[i].prototype.once=s.ngevAddListenerOnce;s.NextGenEvents[i].prototype.off=s.ngevRemoveListener;s.NextGenEvents[i].prototype.removeListener=s.ngevRemoveListener}};s.restore=function e(){r.AsyncTryCatch.substituted=false;r.setTimeout=r.Vanilla.setTimeout;r.setImmediate=r.Vanilla.setImmediate;r.setInterval=r.Vanilla.setInterval;n.nextTick=r.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}for(var t=0;t<s.NextGenEvents.length;t++){s.NextGenEvents[t].prototype.on=s.NextGenEvents[t].on;s.NextGenEvents[t].prototype.addListener=s.NextGenEvents[t].on;s.NextGenEvents[t].prototype.once=s.NextGenEvents[t].once;s.NextGenEvents[t].prototype.off=s.NextGenEvents[t].off;s.NextGenEvents[t].prototype.removeListener=s.NextGenEvents[t].removeListener}}}).call(this,e("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"../package.json":4,_process:3,events:2}],2:[function(e,t,n){},{}],3:[function(e,t,n){var r=t.exports={};var s;var i;function o(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}(function(){try{if(typeof setTimeout==="function"){s=setTimeout}else{s=o}}catch(e){s=o}try{if(typeof clearTimeout==="function"){i=clearTimeout}else{i=c}}catch(e){i=c}})();function a(e){if(s===setTimeout){return setTimeout(e,0)}if((s===o||!s)&&setTimeout){s=setTimeout;return setTimeout(e,0)}try{return s(e,0)}catch(t){try{return s.call(null,e,0)}catch(t){return s.call(this,e,0)}}}function l(e){if(i===clearTimeout){return clearTimeout(e)}if((i===c||!i)&&clearTimeout){i=clearTimeout;return clearTimeout(e)}try{return i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}var u=[];var d=false;var y;var p=-1;function f(){if(!d||!y){return}d=false;if(y.length){u=y.concat(u)}else{p=-1}if(u.length){h()}}function h(){if(d){return}var e=a(f);d=true;var t=u.length;while(t){y=u;u=[];while(++p<t){if(y){y[p].run()}}p=-1;t=u.length}y=null;d=false;l(e)}r.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]}}u.push(new v(e,t));if(u.length===1&&!d){a(h)}};function v(e,t){this.fun=e;this.array=t}v.prototype.run=function(){this.fun.apply(null,this.array)};r.title="browser";r.browser=true;r.env={};r.argv=[];r.version="";r.versions={};function m(){}r.on=m;r.addListener=m;r.once=m;r.off=m;r.removeListener=m;r.removeAllListeners=m;r.emit=m;r.prependListener=m;r.prependOnceListener=m;r.listeners=function(e){return[]};r.binding=function(e){throw new Error("process.binding is not supported")};r.cwd=function(){return"/"};r.chdir=function(e){throw new Error("process.chdir is not supported")};r.umask=function(){return 0}},{}],4:[function(e,t,n){t.exports={name:"async-try-catch",version:"0.3.6",description:"Async try catch",main:"lib/AsyncTryCatch.js",directories:{test:"test"},dependencies:{},devDependencies:{browserify:"^16.2.2",doormen:"^0.7.20","expect.js":"^0.3.1","nextgen-events":"^0.14.6","uglify-js-es6":"^2.8.9"},scripts:{test:"mocha -R dot"},repository:{type:"git",url:"https://github.com/cronvel/async-try-catch.git"},keywords:["async","try","catch"],author:"Cédric Ronvel",license:"MIT",bugs:{url:"https://github.com/cronvel/async-try-catch/issues"},copyright:{title:"Async Try-Catch",years:[2015,2018],owner:"Cédric Ronvel"}}},{}]},{},[1])(1)});

@@ -80,2 +80,3 @@ /*

if ( ! global.Vanilla.setImmediate ) { global.Vanilla.setImmediate = setImmediate ; }
if ( ! global.Vanilla.setInterval ) { global.Vanilla.setInterval = setInterval ; }
if ( ! global.Vanilla.nextTick ) { global.Vanilla.nextTick = process.nextTick ; }

@@ -137,3 +138,3 @@

// for setTimeout(), setImmediate(), process.nextTick()
// for setTimeout(), setImmediate(), setInterval(), process.nextTick()
AsyncTryCatch.timerWrapper = function timerWrapper( originalMethod , fn , ... args ) {

@@ -153,3 +154,4 @@ var context , wrapperFn ;

global.AsyncTryCatch.stack.push( context ) ;
returnVal = fn.call( this , ... wrapperArgs ) ;
//returnVal = fn.call( this , ... wrapperArgs ) ;
returnVal = fn( ... wrapperArgs ) ;
global.AsyncTryCatch.stack.pop() ;

@@ -236,2 +238,3 @@ return returnVal ;

AsyncTryCatch.setImmediate = AsyncTryCatch.timerWrapper.bind( undefined , global.Vanilla.setImmediate ) ;
AsyncTryCatch.setInterval = AsyncTryCatch.timerWrapper.bind( undefined , global.Vanilla.setInterval ) ;
AsyncTryCatch.nextTick = AsyncTryCatch.timerWrapper.bind( process , global.Vanilla.nextTick ) ;

@@ -305,3 +308,4 @@

global.setTimeout = AsyncTryCatch.setTimeout ;
global.setImmediate = AsyncTryCatch.setTimeout ;
global.setImmediate = AsyncTryCatch.setImmediate ;
global.setInterval = AsyncTryCatch.setInterval ;
process.nextTick = AsyncTryCatch.nextTick ;

@@ -355,2 +359,3 @@

global.setImmediate = global.Vanilla.setImmediate ;
global.setInterval = global.Vanilla.setInterval ;
process.nextTick = global.Vanilla.nextTick ;

@@ -357,0 +362,0 @@

{
"name": "async-try-catch",
"version": "0.3.6",
"version": "0.3.7",
"description": "Async try catch",

@@ -11,7 +11,6 @@ "main": "lib/AsyncTryCatch.js",

"devDependencies": {
"browserify": "^13.1.0",
"browserify": "^16.2.2",
"doormen": "^0.7.20",
"expect.js": "^0.3.1",
"jshint": "^2.9.3",
"mocha": "^3.0.2",
"nextgen-events": "^0.12.3",
"nextgen-events": "^0.14.6",
"uglify-js-es6": "^2.8.9"

@@ -18,0 +17,0 @@ },

@@ -421,2 +421,4 @@ /*

describe( "Full NextGen Events test suite execution" , function() {
global.expect = require( 'doormen' ).expect ;
it.optional = it.skip ;
require( 'nextgen-events/test/NextGenEvents-test.js' ) ;

@@ -423,0 +425,0 @@ } ) ;

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