Skip to content
This repository was archived by the owner on Aug 1, 2025. It is now read-only.

feat: Add fetchOptions to install#10

Merged
EverlastingBugstopper merged 1 commit intomainfrom
feature/install-fetch-options
Oct 21, 2021
Merged

feat: Add fetchOptions to install#10
EverlastingBugstopper merged 1 commit intomainfrom
feature/install-fetch-options

Conversation

@mjbyrnes4664
Copy link
Collaborator

#9

@mjbyrnes4664 mjbyrnes4664 force-pushed the feature/install-fetch-options branch from 19fb32d to effc3a1 Compare October 11, 2021 18:51
@EverlastingBugstopper
Copy link
Owner

EverlastingBugstopper commented Oct 13, 2021

do we maybe need to set a default value for the fetchOptions parameter so you don't have to pass null explicitly? or.. like does javascript do that automatically. i'm thinking like install(fetchOptions = null) maybe? i think it might just be undefined though if you don't pass it. just want to make sure it's backwards compatible

@mjbyrnes4664
Copy link
Collaborator Author

do we maybe need to set a default value for the fetchOptions parameter so you don't have to pass null explicitly? or.. like does javascript do that automatically. i'm thinking like install(fetchOptions = null) maybe? i think it might just be undefined though if you don't pass it. just want to make sure it's backwards compatible

JS automatically assigns undefined for parameters that are not passed and the spread operator (...) will return nothing when it tries to spread undefined or null. So calling install() is the same as calling install(undefined). If we want to have a safe default we could default to an empty object like install(fetchOptions = {})

@EverlastingBugstopper
Copy link
Owner

ok, i think it's fine to leave as is then :)

@EverlastingBugstopper EverlastingBugstopper merged commit d90de03 into main Oct 21, 2021
@EverlastingBugstopper EverlastingBugstopper deleted the feature/install-fetch-options branch October 21, 2021 15:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants