-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
56 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -428,19 +428,32 @@ function factory (type, config, load, typed, math) { | |
* else throws an error | ||
*/ | ||
function customs (fn) { | ||
if (fn === jsEval) { | ||
throw new Error('Calling "eval" is not allowed'); | ||
} | ||
|
||
if (fn === Function) { | ||
throw new Error('Calling "Function" is not allowed'); | ||
} | ||
|
||
if (fn === jsEval) { | ||
throw new Error('Calling "eval" is not allowed'); | ||
if (fn === Function.apply) { | ||
throw new Error('Calling "apply" is not allowed'); | ||
} | ||
|
||
if (fn === Function.call) { | ||
throw new Error('Calling "call" is not allowed'); | ||
} | ||
|
||
if (fn === Function.bind) { | ||
throw new Error('Calling "bind" is not allowed'); | ||
} | ||
|
||
// this function is ok | ||
return fn; | ||
} | ||
|
||
var jsEval = eval | ||
var jsApply = eval | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
josdejong
Author
Owner
|
||
|
||
exports.name = 'FunctionNode'; | ||
exports.path = 'expression.node'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Quick question, what is the use of this declared but never used variable?