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

encore-device-detector

Package Overview
Dependencies
Maintainers
8
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

encore-device-detector

Provide methods to identify device type and set specific CSS class.

  • 1.4.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
8
Created
Source

Encore device detector

Provide methods to identify device type and set specific CSS class.

Install

$ npm install encore-device-detector

Usage

  1. Import DeviceDetector class
  2. Create an instance and use it

Documentation

Library allows us to detect several device types: - mobile - tablet - desktop - ios It also allows us to detect some specific browsers: - ie - edge - safari And detect orientation: - portrait - landscape

Methods

setDeviceRelatedClassnames - Check device and browser and add specific CSS classes (available options: encore-mobile, encore-tablet, encore-desktop, encore-ie, encore-edge, encore-safari). Classes are configurable and can be changed using classNameConfiguration parameter isTablet - Check if device is tablet isMobile - Check if device is mobile isDesktop - Check if device is desktop isIE - Check if browser is IE isEdge - Check if browser is Edge isSafari - Check if browser is Safari isPortrait - Check if portrait orientation isLandscape - Check if landscape orientation

FAQs

Package last updated on 08 Sep 2020

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