Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple vars in global functions in variables #132

Open
JoacimWall opened this issue Sep 7, 2023 · 2 comments
Open

multiple vars in global functions in variables #132

JoacimWall opened this issue Sep 7, 2023 · 2 comments
Labels
question Further information is requested

Comments

@JoacimWall
Copy link

Hi
I use like this today
variables:
setTempMessage: |
temp => {
is it possible to add one more var to the call.
like sampel below?
variables:
setTempMessage: |
temp,unit_c_f => {

//Joacim

@ildar170975
Copy link
Collaborator

ildar170975 commented Sep 17, 2023

Please edit your post to ensure that a code is properly formatted. Use triple"`".
Currently your issue could be unclear.

@ildar170975 ildar170975 added the question Further information is requested label Jan 16, 2024
@PaulSD
Copy link

PaulSD commented Dec 23, 2024

@JoacimWall The syntax uses standard Javascript "Arrow Functions".
You simply need parenthesis around your arguments:

variables:
  test: |
    (a,b) => {return a+b;}
...
${test(1, 2)}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants