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

Export getCurrentContext function from -sdk module #373

Open
dannycalleri opened this issue Jan 12, 2023 · 0 comments
Open

Export getCurrentContext function from -sdk module #373

dannycalleri opened this issue Jan 12, 2023 · 0 comments

Comments

@dannycalleri
Copy link

The getCurrentContext function may be useful to users (instead of accessing explicitly window.__LD__) to access the user context.

A use case I've in mind is when you want to enrich the data you passed previously to identify() by doing another call to it. In this case, it's handy to get the current user context, instead of gathering again all the needed data.

Right now, you can import it by doing

import { getCurrentContext } from 'ember-launch-darkly/-sdk/context';

I think it would be nice to export it from the -sdk module index, so that's clear that the function is intended to be used from the outside, as identify, variation, etc.

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

1 participant