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

Add "set but don't re-publish" flag #18

Open
jonathanvanschenck opened this issue May 20, 2022 · 0 comments
Open

Add "set but don't re-publish" flag #18

jonathanvanschenck opened this issue May 20, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@jonathanvanschenck
Copy link
Collaborator

jonathanvanschenck commented May 20, 2022

It would be nice to add an option to the set method which will make is so that the value isn't subsequently published over subscriptions if the value didn't actually change:

datastore.subscribe("data", console.log);
datastore.set("data", true); // prints true
datastore.set("data", true, { no_republish:true }); // prints nothing
datastore.set("data", true); // prints true
datastore.set("data", false); // prints false
@jonathanvanschenck jonathanvanschenck added the enhancement New feature or request label May 20, 2022
@jonathanvanschenck jonathanvanschenck self-assigned this May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant