Skip to content

cfware/activity-monitor

Repository files navigation

@cfware/activity-monitor NPM Version

Browser activity monitor.

Usage

import ActivityMonitor from '@cfware/activity-monitor';

const activityMonitor = new ActivityMonitor(() => {
	if (!activityMonitor.activity) {
		console.log('Inactive');
		activityMonitor.disable();
	}
});

activityMonitor.enable();