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

webdetta

Package Overview
Dependencies
Maintainers
1
Versions
460
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webdetta - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

2

package.json
{
"name": "webdetta",
"version": "0.0.6",
"version": "0.0.7",
"author": "Fedot Kriutchenko <fodyadev@gmail.com>",

@@ -5,0 +5,0 @@ "description": "",

const AsyncFunction = (async () => {}).constructor;
export const isAsync = f => f instanceof AsyncFunction;
export const safe = f => (...args) => {
export const safe = func => function() {
try {
return isAsync(f)
? Promise.resolve().then(() => f(...args)).catch(e => console.error(e))
: f(...args);
return isAsync(func)
? Promise.resolve()
.then(() => f.apply(this, arguments))
.catch(e => console.error(e))
: f.apply(this, arguments);
}
catch (e) { console.error(e); }
}
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