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

POC: Add template if function and collapse multiple consequent cases #36

Open
4 tasks
korzio opened this issue Jul 7, 2017 · 0 comments
Open
4 tasks
Milestone

Comments

@korzio
Copy link
Owner

korzio commented Jul 7, 2017

  • Check jsperf or other resource that optimization makes sense
  • Add template if function
  • Replace all validators related if-cases
  • Collapse multiple cases, include empty if statements

Possible Syntax

tpl.if('test')
...
tpl.endif() // ?
// => 
'if(test) {}'

Generated function code example

if(a > b) {
  if (c > d) {
    ...
  }
} 
// =>
if(a > b && c > d) {
  ...
}

...
if(a>b){ } 
// =>
// empty
@korzio korzio changed the title Add template if function and collapse multiple consequent cases POC: Add template if function and collapse multiple consequent cases Jul 7, 2017
@korzio korzio added this to the 2.0.1 milestone Oct 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant