UNPKG

smart-idle

Version:

Lightweight browser library to detect user inactivity with event dispatching

27 lines (20 loc) 600 B
#!/usr/bin/env node const pkg = require('../package.json'); const args = process.argv.slice(2); if (args.includes('--help') || args.includes('-h')) { console.log(` ${pkg.name} v${pkg.version} A lightweight browser idle detection library. Usage: Import and use in the browser: import { SmartIdle } from 'smart-idle'; CLI Options: --help, -h Show help message Documentation: https://github.com/ward-00/smart-idle `); process.exit(0); } else { console.log("Command not recognized. Use --help for more info."); process.exit(0); }