Comparing version 0.1.1 to 0.1.2
@@ -11,3 +11,3 @@ /*! | ||
var reFnArgs = /\(([^)]*)\)/; | ||
var reFnArgs = /^function\s*[^(]*\(([^)]+)\)/; | ||
@@ -19,5 +19,9 @@ var fnArgs = function (fn) { | ||
if (fn.length === 0) { | ||
return []; | ||
} | ||
var match = reFnArgs.exec(fn.toString()); | ||
return match && match[1].length > 0 ? match[1].split(',').map(function (el) { | ||
return match ? match[1].split(',').map(function (el) { | ||
return el.trim(); | ||
@@ -24,0 +28,0 @@ }) : []; |
{ | ||
"name": "fn-args", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Get the arguments of a function", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
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
1931
28