Comparing version 1.0.0 to 1.0.1
14
index.js
@@ -36,2 +36,8 @@ 'use strict'; | ||
function maybeCountParam(next) { | ||
if (next !== ')') { | ||
++declaredParameterCount; | ||
} | ||
} | ||
tokenLoop: | ||
@@ -48,7 +54,3 @@ for (const tok of tokenize(str)) { | ||
inFormalParameterList = true; | ||
onNext = function countFirstParam(next) { // eslint-disable-line | ||
if (next !== ')') { | ||
declaredParameterCount = 1; | ||
} | ||
}; | ||
onNext = maybeCountParam; | ||
} | ||
@@ -64,3 +66,3 @@ // fallthrough | ||
if (inFormalParameterList && bracketDepth === 1) { | ||
++declaredParameterCount; | ||
onNext = maybeCountParam; | ||
} | ||
@@ -67,0 +69,0 @@ break; |
{ | ||
"name": "arity-of", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Exposes max arity and other metadata for JS functions", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
272
24392