-
-
Notifications
You must be signed in to change notification settings - Fork 531
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
Downgrade to yn v3 to avoid v4's node 10 requirement #942
Conversation
src/index.ts
Outdated
*/ | ||
function yn (value: string | undefined) { | ||
const parsed = ynModule(value) | ||
return parsed === null ? undefined : parsed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also just use nullish coalescing within the DEFAULTS object nowadays.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah good point. Even using ??
, it's a bit more DRY to keep it within this helper function, and it matches the API of yn
v4. Do you still want to get rid of the helper function and move it all to the DEFAULTS
object literal?
Thank you so much @cspotcode & @blakeembrey! |
Fixes #940