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

Inline object notation #25

Closed
1ec5 opened this issue Apr 27, 2018 · 2 comments · Fixed by #35
Closed

Inline object notation #25

1ec5 opened this issue Apr 27, 2018 · 2 comments · Fixed by #35

Comments

@1ec5
Copy link

1ec5 commented Apr 27, 2018

The readme says this library doesn’t have a way to represent JSON object literals for the literal expression, due to a jsep limitation. Perhaps there could be an inline notation such as object(key1, value1, key2, value2, …).

There are a few error conditions to consider:

  • Duplicate keys
  • An odd number of arguments to the function
  • Keys that aren’t strings

Besides literal, an object literal syntax is needed because mapbox/mapbox-gl-js#6270 introduced a Collator object type that can be passed into various comparison expressions.

/cc @dasulit @davidtheclark @samanpwbb @anandthakker @ChrisLoer

@anandthakker
Copy link

anandthakker commented May 1, 2018

Looks like there's a (rather old) PR adding object literal support: EricSmekens/jsep#14

@1ec5
Copy link
Author

1ec5 commented Dec 20, 2018

The number-format operator introduced in mapbox/mapbox-gl-js#7626 also takes an options object as an argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants