Socket
Socket
Sign inDemoInstall

autoesc

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

autoesc - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

19

index.js

@@ -33,3 +33,20 @@ var errTo = require('errto');

function autoesc(func) {
return function autoesc_decorated() {
if (typeof(func) !== 'function') {
throw new Error('autoesc requires a function');
}
switch (func.length) {
case 1: return function (cb) { return autoesc_decorated.apply(this, arguments); };
case 2: return function (a, cb) { return autoesc_decorated.apply(this, arguments); };
case 3: return function (a, b, cb) { return autoesc_decorated.apply(this, arguments); };
case 4: return function (a, b, c, cb) { return autoesc_decorated.apply(this, arguments); };
case 5: return function (a, b, c, d, cb) { return autoesc_decorated.apply(this, arguments); };
case 6: return function (a, b, c, d, e, cb) { return autoesc_decorated.apply(this, arguments); };
case 7: return function (a, b, c, d, e, f, cb) { return autoesc_decorated.apply(this, arguments); };
case 8: return function (a, b, c, d, e, f, g, cb) { return autoesc_decorated.apply(this, arguments); };
case 9: return function (a, b, c, d, e, f, g, h, cb) { return autoesc_decorated.apply(this, arguments); };
default:
return autoesc_decorated;
}
function autoesc_decorated() {
var args = Array.prototype.slice.call(arguments, 0);

@@ -36,0 +53,0 @@ if (args.length === 0) throw new Error('autoesc function requires at least one argument (a Node-style callback)');

2

package.json
{
"name": "autoesc",
"version": "1.0.0",
"version": "1.1.0",
"description": "Error Short Circuiter (ESC) function decorator",

@@ -5,0 +5,0 @@ "main": "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