Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jam3/detect

Package Overview
Dependencies
Maintainers
16
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jam3/detect

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

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
158
decreased by-4.82%
Maintainers
16
Weekly downloads
 
Created
Source

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 {bots, browser} from '@jam3/detect';

Usage

  1. Know the OS Major Version
import {os} from '@jam3/detect';

console.log(os.getOSMajorVersion());
  1. Get device orientation
import {device} from '@jam3/detect';

console.log(device.isPortrait());
console.log(device.isLandscape());

TODO

  1. Unify API, there are some boolean and methods called is[noun], we should have a clear convention between methods and variables.

Keywords

FAQs

Package last updated on 27 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc