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

Configuration to allow empty String to be falsey #130

Open
agentgt opened this issue May 5, 2023 · 2 comments
Open

Configuration to allow empty String to be falsey #130

agentgt opened this issue May 5, 2023 · 2 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Milestone

Comments

@agentgt
Copy link
Contributor

agentgt commented May 5, 2023

JStachio assumes that only null strings can be falsey and not empty strings.

JMustache by default assumes similar but it is configurable.

I'm not sure what Mustache.java does but I assume it is similar by default and probably configurable.

For greenfield projects this feature is debatable. If one wants to test for empty strings one can make a custom Lambda.

However for existing projects or one migrating to javascript mustache templates this might be desirable.

@agentgt agentgt added documentation Improvements or additions to documentation enhancement New feature or request labels May 5, 2023
@agentgt agentgt added this to the v1.1.0 milestone May 5, 2023
@agentgt agentgt modified the milestones: v1.1.0, v1.2.0, v2.0.0 Jun 6, 2023
@agentgt
Copy link
Contributor Author

agentgt commented Aug 22, 2023

A more general pluggable falsey would be better. Closing for now.

@agentgt agentgt closed this as not planned Won't fix, can't repro, duplicate, stale Aug 22, 2023
@agentgt agentgt reopened this Jan 12, 2024
@agentgt
Copy link
Contributor Author

agentgt commented Jan 12, 2024

Regardless if we do make a more general pluggable falsey we need this feature distinctly separated out for ease of onboarding JMustache users. In JMustache the property is called: emptyStringIsFalse.

JMustache also has treat 0 as falsey as an option: zeroIsFalse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant