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

egg-aop

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-aop - npm Package Compare versions

Comparing version 0.3.8 to 0.3.9

32

lib/aspect.js

@@ -30,23 +30,23 @@ "use strict";

newFn = function (...args) {
let result = fn.apply(this, getFinalData(this, args, point.before));
if (result instanceof Promise) {
result = result.then((ret) => {
return getFinalData(this, ret, point.after);
});
if (point.onError) {
result = result
.catch(error => {
throw getFinalData(this, error, point.onError);
try {
let result = fn.apply(this, getFinalData(this, args, point.before));
if (result instanceof Promise) {
result = result.then((ret) => {
return getFinalData(this, ret, point.after);
});
if (point.onError) {
result = result
.catch(error => {
throw getFinalData(this, error, point.onError);
});
}
return result;
}
return result;
}
else {
try {
else {
return getFinalData(this, result, point.after);
}
catch (error) {
throw getFinalData(this, error, point.onError);
}
}
catch (error) {
throw getFinalData(this, error, point.onError);
}
};

@@ -53,0 +53,0 @@ }

{
"name": "egg-aop",
"version": "0.3.8",
"version": "0.3.9",
"description": "aop for egg.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc