Skip to content

Instantly share code, notes, and snippets.

@pwm1991
Last active June 30, 2020 13:04
Show Gist options
  • Select an option

  • Save pwm1991/ca13e3433dc0d29f6340b700e7b17889 to your computer and use it in GitHub Desktop.

Select an option

Save pwm1991/ca13e3433dc0d29f6340b700e7b17889 to your computer and use it in GitHub Desktop.
// Query a JS Function with Args in a Tag
// Quote args even if not a string.
{{ Variable }}("{{ Varible }}")
// e.g.:
{{function parseFloat x100}}("{{transactionTotal}}")
// The variable needs to return a fn with the desired args:
function() {
return function(input) {
// do stuff
return input
}
}
// Fns within variables is slightly different:
function() {
let var = (function() {
return target.test(input) ? true : false
} ()
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment