-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: xApplyFunctionStr did not accept functions
- Loading branch information
Showing
2 changed files
with
10 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -30,7 +30,7 @@ export function xApplyFunctionStr( | |
const fct = new Function( | ||
variableLabel, | ||
`return Number(${fctString | ||
.replace(/(?:^|\W)(?:[a-z]{2,})/g, '$1Math.$2') | ||
.replace(/(?<before>^|\W)(?<after>[a-z0-9]{2,}\()/g, '$1Math.$2') | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
lpatiny
Author
Member
|
||
.replace(/Math\.Math/g, 'Math')})`, | ||
); | ||
const toReturn = Float64Array.from(array); | ||
|
btw you can use
$<before>
and$<after>
in the replacement string