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

fix(window.FEATURES.feature): state function reads from environment when cookie not available #5

Closed

Conversation

FranciscoKloganB
Copy link

@FranciscoKloganB FranciscoKloganB commented Aug 3, 2022

Changelist:

  • One line _stringToBool
  • Add getFeatureFromEnv
    • Ensure getFeatureFromEnv and getFeatureFromCookie have similar return types
  • Add spec
    • "shows state of the feature from env when cookie not available"
    • "shows state false when feature not available"
  • Change spec
    • "shows state of the feature from cookie"
      • Compare against defined values instead of truthy and falsey
  • Refactor variable names to be similar across functions

src/index.ts Outdated Show resolved Hide resolved
@FranciscoKloganB
Copy link
Author

Does this make sense?

Copy link
Owner

@asantos00 asantos00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

src/index.ts Show resolved Hide resolved
@FranciscoKloganB
Copy link
Author

I have not merged this yet, cause I still want to bootstrap a demo project to test this manually. ⌛

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

Successfully merging this pull request may close these issues.

None yet

2 participants