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

Wrap optional params in options object #3

Open
jordanh opened this issue Mar 18, 2016 · 0 comments
Open

Wrap optional params in options object #3

jordanh opened this issue Mar 18, 2016 · 0 comments

Comments

@jordanh
Copy link
Contributor

jordanh commented Mar 18, 2016

There are a few global options I'd like to be able to add to all of the route generation functions. To avoid parameter length hell, the first step would be to change the call signatures of our methods slightly.

From:

export function createGetByIdRoute(routeBasename, acceptedKeys, getByIdPromise,
  modelKeyGetter = defModelKeyGetter,
  modelIdKey = defModelIdKey) { /* ... */ }

To:

export function createGetByIdRoute(routeBasename, acceptedKeys, getByIdPromise,
  options = defOptions) { /* ... */ }
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