You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.
Sometimes you need to calculate data for every record in KV
Worth mentioning:
Calculated data might be anything. E.g. it can be a sum of two fields, some string based on certain conditions. Literally anything. So API should be low-level rather than something rigid like createSwitch etc.
There is could be a case where you don't need all your key-values. For example, you want to have only roles.includes(preferredRole) values in map. In such case, we can create filter api as well. Also, if your kv changes very often, filter could save a lot of updates.
Additionally, I can imagine the case with desired updates only triggered by clock.
createMap($statsWidgets,{
clock,
filter,
fn
})
That thing looks very similar to sample. That could be a good reason to create sourcebale API for sample and use kv as source.
Anyway, I think it would be nice to have createMap with clock, filter and fn as first implementation.
Case
Sometimes you need to calculate data for every record in KV
Worth mentioning:
createSwitch
etc.Solution
Also, there's an optional
source
fieldThe text was updated successfully, but these errors were encountered: