-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨[amp-analytics] New macro $CALC to perform basic arithmetic on analy…
…tics variables and macros. (#33383) * New macro for performing basic arithmetic on other macros and variables * fixed suggestions from prettify * added testcase to cover default flow * Added a new flag to round the results to integer This flag is helpful as some vendors like google analytics expects event value to be an integer. * assert when rightOperand is 0 while dividing * calc operations are lowercase to honor macro coding convention
- Loading branch information
1 parent
e90491f
commit 0e11de9
Showing
3 changed files
with
98 additions
and
14 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
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