Add the global concurrency-safe increment counter
Proposal
As a user for this plugin, I would like to use global counter, e.g. for IDs or for cursor-alike APIs. To do that, there should be a concurrency-safe increment logic, maybe offered as a handlebars Marco. Other similar methods would be nice as well
As a bonus point, it would be nice to use the storage API to ensure that it remains concurrency-safe even when HA-alike features re used, but I think it is for the future and needs API review together with @tomakehurst
References
No response
I have an almost-ready PR on my laptop that makes use of the storage API. I've still got a couple of tests to fix but I can push it to a branch if anyone's interested in looking.
It would be great @tomakehurst ! Do not forget to register for Hacktoberfest too 👼
Just reached this while trying to fix a bug with redundant updates: somehow I either need a lock or a concurrent update mechanism for a store which also works in HA. @tomakehurst if I can support in any way I'm happy to contribute.