Lightweight and fast device detector that works with Cloudflare Workers and Edge Runtime.
- 🚀 Works in Edge Runtime
- 💪 TypeScript support
- 🔍 Accurate device detection
- 🤖 Bot detection
- 🌐 Browser detection
- 📱 Device detection
- 💻 OS detection
- ⚡ Zero dependencies
- 🔒 Type safe
npm install cloudflare-device-detector
npm install nuxt-device-detector
import { DeviceDetector } from 'cloudflare-device-detector';
const detector = new DeviceDetector();
const result = detector.parse(userAgent);
// nuxt.config.ts
export default defineNuxtConfig({
modules: ['nuxt-device-detector']
})
// In your component
const { isMobile, browserName, osName } = useDevice();
MIT