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

ismobilejs

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ismobilejs

A simple JS library that detects mobile devices.

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
256K
decreased by-5.88%
Maintainers
1
Weekly downloads
 
Created

What is ismobilejs?

The ismobilejs npm package is a utility library that helps in detecting if a user is accessing a website from a mobile device. It provides a simple API to determine the type of device (mobile, tablet, or desktop) and the operating system being used.

What are ismobilejs's main functionalities?

Detect if the device is mobile

This feature allows you to check if the current device is a mobile device. The 'any' property returns true if the device is a mobile device, otherwise false.

const isMobile = require('ismobilejs');
console.log(isMobile().any); // true if the device is mobile, false otherwise

Detect if the device is a tablet

This feature allows you to check if the current device is a tablet. The 'tablet' property returns true if the device is a tablet, otherwise false.

const isMobile = require('ismobilejs');
console.log(isMobile().tablet); // true if the device is a tablet, false otherwise

Detect the operating system

This feature allows you to determine the operating system of the current device. The 'os' property returns the name of the operating system.

const isMobile = require('ismobilejs');
console.log(isMobile().os); // returns the operating system of the device

Other packages similar to ismobilejs

Keywords

FAQs

Package last updated on 19 Aug 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