@jam3/detect

User agent feature detection like Device Orientation, in App Browser Detection, etc

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@jam3/detect
222.0.52 years ago4 years agoMinified + gzip package size for @jam3/detect in KB

Readme

detect
User Agent refined detect, it's using bowser as a base detector.

Why do we need another detector?

This detector has some important features that we use at Jam3 like Device Orientation, in App Browser Detection, etc.

Installation

npm install @jam3/detect

Importing

import detect from '@jam3/detect';
import { os, browser, device } from '@jam3/detect';

Usage

  1. Know the OS Major Version

import { os } from '@jam3/detect';

console.log(os.majorVersion);

  1. Get device orientation

import { device } from '@jam3/detect';

console.log(device.portrait);
console.log(device.landscape);