@jam3/detect
TypeScript icon, indicating that this package has built-in type declarations

2.0.5 • Public • Published

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);

Readme

Keywords

Package Sidebar

Install

npm i @jam3/detect

Weekly Downloads

244

Version

2.0.5

License

MIT

Unpacked Size

70.8 kB

Total Files

21

Last publish

Collaborators

  • hperigo
  • gabroell
  • josdelgaur
  • jam3dev
  • njam3
  • iranreyes
  • namniak
  • donghyukjang
  • alemesa
  • neoli
  • colin-j3
  • jmckinnell
  • n0wak
  • amelierosser
  • artemleznikov
  • jeffong