nebenan-heartbeat
Global helper to run functions at roughly defined intervals if the current tab is active. Save to call in server environments.
Heartbeat listeners get executed in the order they were added.
Best to only have one instance of nebenan-heartbeat
in your bundle. List it as peer dependency in non-app packages.
npm install --save nebenan-heartbeat