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

config method can be made asynchronous #18

Closed
mageshpandian91 opened this issue Jul 12, 2017 · 2 comments · Fixed by #20
Closed

config method can be made asynchronous #18

mageshpandian91 opened this issue Jul 12, 2017 · 2 comments · Fixed by #20

Comments

@mageshpandian91
Copy link

Initial loading of features in an asynchronous way can be improvised.

Let us assume someAysnchronousFunction is returning features loaded from redis

fflip.config({ criteria: {}, 
                     features: someAysnchronousFunction, 
                     reload: anyInterval });
fflip.isEnabledForUser(feature, user);  // This is returning null as the features are not yet loaded

can this be like

fflip.config({ criteria: {}, features: someAysnchronousFunction, reload: anyInterval }, function(){
  fflip.isEnabledForUser(feature, user); 
})
@ismriv
Copy link

ismriv commented Dec 25, 2017

I'm interested in this too.

@FredKSchott is this module still maintained? It's quite popular, but last commit is almost 2 years old. I can put together a PR if it would be merged and released.

@FredKSchott
Copy link
Owner

@ismriv definitely, I'd love some help! This has been too far down on my todo list unfortunately. Happy to review any PRs though if you're interested

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 a pull request may close this issue.

3 participants