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

Optional fields #10

Closed
sparkprime opened this issue Aug 10, 2014 · 0 comments
Closed

Optional fields #10

sparkprime opened this issue Aug 10, 2014 · 0 comments

Comments

@sparkprime
Copy link
Member

It would be good if a computed field name evaluated to null, rather than being a dynamic error, if that field was simply omitted from the object. For example

{
    x: 1,
    [if nighttime then "light_brightness" else null]: 100,
}

Will yield either {x: 1} or {x: 1, light_brightness: 100} depending on whether nighttime is true.

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