Given prettier was run here, feature-flags.js and test.js are the places to focus most of the energy on.
What this does
Adds support for feature flags
Make everything prettier
What this does not do
Refactor the existing codebase - I was originally doing this but decided to leave this up to a separate PR. Things like consolidating all the requests, etc.
How the feature flags work
This follows the posthog-python implementation almost exactly.
Follow-up work
Documentation
Writing up a feature flags spec - indeed the posthog-python code somewhat serves as this, but we need a place that at least tells us how to correctly calculate simple flags so we don't end up with diverging implementations. I spent some time playing around with crypto to get this right.
Dear Reviewer
Given
prettier
was run here, feature-flags.js and test.js are the places to focus most of the energy on.What this does
prettier
What this does not do
How the feature flags work
This follows the
posthog-python
implementation almost exactly.Follow-up work
posthog-python
code somewhat serves as this, but we need a place that at least tells us how to correctly calculate simple flags so we don't end up with diverging implementations. I spent some time playing around withcrypto
to get this right.