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

detect-mobile-browser

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

detect-mobile-browser

It is a very simple & small javascript plugin to detect all major modern mobile browsers.

  • 3.1.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.7K
decreased by-9.78%
Maintainers
1
Weekly downloads
 
Created
Source

Build NPM Version NPM Downloads Inline docs Coverage Status
NPM

Detect Mobile Browser

Small plugin to detect mobile browser

Usage Frontend:-

alert(SmartPhone.isAndriod());

OR

alert(SmartPhone.isAny());

Usage Backend:-

User as a ExpressJS middleware

var mobileBrowser = require('./detect-browser');

...
...

app.use(mobileBrowser());

app.get('/', function (req, res){
    ...
    ...
    //in req
    console.log(req.SmartPhone.isAny());

    ...
    ...

    //in res locals to use in templates
    console.log(res.locals.SmartPhone.isAny());

    ...
    ...

});

Bower

$ bower install browser-detector --save

NPM

$ npm install detect-mobile-browser --save

SPM

$ spm install detect-mobile-browser --save

Keywords

FAQs

Package last updated on 11 Nov 2015

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