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

Facet Cursor syntax #195

Closed
ivan-kleshnin opened this issue Apr 24, 2015 · 3 comments
Closed

Facet Cursor syntax #195

ivan-kleshnin opened this issue Apr 24, 2015 · 3 comments

Comments

@ivan-kleshnin
Copy link
Contributor

Continue to experiment with Baobab. Facets look great. One little question / proposal:

Current syntax:

cursors: {
  url: ["url"],
  models: ["robots", "models"],
},
get: function(data) {
  let {url, models} = data; 
  ...
}

Subjectively cleaner alternative:

cursors: [
  ["url"],
  ["robots", "models"],
],
get: function(url, models) {
  ...
}

Keys removed, destructuring is lifted to function signature.

@bebraw
Copy link
Contributor

bebraw commented Apr 24, 2015

👍

@Yomguithereal
Copy link
Owner

Why not? This wouldn't be incompatible with the current implementation. Let me thinks about it a bit more and take a decision.

@Yomguithereal
Copy link
Owner

Shorthand implemented in v2.

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

3 participants