webapp-state (npm): A utility with sugar on top of the low-level online/offline events and the Page Visibility API
Keywords: page visibility api|navigator onLine|visibilitychange event|online event|offline event|setInterval|poller