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

Why are options and data separate? #34

Open
ubershmekel opened this issue Jan 7, 2019 · 2 comments
Open

Why are options and data separate? #34

ubershmekel opened this issue Jan 7, 2019 · 2 comments

Comments

@ubershmekel
Copy link

ubershmekel commented Jan 7, 2019

If we're breaking compatibility - can options and data be merged?

#33

@ubershmekel ubershmekel changed the title Why are options and params separate? Why are options and data separate? Jan 7, 2019
@commonpike
Copy link

commonpike commented May 21, 2019

Why are options and data separate?

Because they apply to different things.

The data is used to generate the calendar links. Different types of calendars can be added later. There could for example be a calendar for 'zoom invite' one day. These calendars need not be aware of the 'options'.

The options are used to decide how and where these calendars should be generated. Different types of options could be added later. There could for example be an option called 'style' one day, to get a dark and a light version. These options need not be aware of the 'data'.

can options and data be merged?

Curious - why do you want this ?

@ubershmekel
Copy link
Author

It seems tedious to have two objects as input instead of one. Just more API surface to learn. Many JS functions cram every single option and data into one object. It's especially nicer when the objects are big, so indentation doesn't get awkward with two multiline objects in one function call.

But if you prefer to keep them separate, do your thing.

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

No branches or pull requests

2 participants