Comparing version 0.0.1 to 0.0.2
14
index.js
@@ -149,5 +149,5 @@ /* | ||
const name = func.name || 'recurse'; | ||
const obj = { | ||
[name]: function() { | ||
const firstEval = func.apply(thisArg, Array.from(arguments)); | ||
const recursiveFunc = { | ||
[name]: (...args) => { | ||
const firstEval = func.apply(thisArg, args); | ||
if (!(firstEval instanceof StackFrame)) { | ||
@@ -157,6 +157,6 @@ return firstEval; | ||
return new CallStack(firstEval).evaluate(); | ||
} | ||
} | ||
originalFunctionMap.set(obj[name], func); | ||
return obj[name]; | ||
}, | ||
}[name]; | ||
originalFunctionMap.set(recursiveFunc, func); | ||
return recursiveFunc; | ||
} | ||
@@ -163,0 +163,0 @@ |
{ | ||
"name": "tallstack", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "A library that allows you to define recursive functions in JavaScript without stack overflow.", | ||
@@ -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
10984