Skip to content

undeviceУзнайте устройство. Добавьте свои флаги.

Определение устройства, ОС и браузера по заголовкам. Без зависимостей, с TypeScript и поддержкой CDN.

undeviceundevice
ts
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
;

Released under the MIT License.