Any runtime
Node.js, browser, or edge. You supply the input; undevice returns the flags.
Device, OS, and browser detection from headers. Dependency-free, typed, and ready for CDN signals.
import { isbot } from "isbot";
import { undevice } from "undevice";
const { detect } = undevice({
isCrawler: isbot,
isRawClient: ["curl", "wget"],
});
const device = detect({ userAgent: navigator.userAgent });
device.isMobile;
device.isDesktop;
device.isWindows;
device.isChrome;
device.isCrawler;
device.isRawClient;