New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

express-ua

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-ua

Middleware for Express, print YUI style userAgent info on html & req.ua, classify browser type by modern/mobile/obsolete

  • 0.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

express-ua

NPM Version NPM Downloads Build Status Test Coverage

Print YUI style userAgent info on html & req.ua Classify browser type by modern/mobile/obsolete

Usage

for express middleware:

	...
	app.use(require('express-ua'))
	...
	app.use(function(req, res, next){
		console.log(req.ua)
	})
	...
	output example: 
  {
    os: 'Windows',
    browser: 'Chrome',
    ver: '40',
    isModern: true,
    isMobile: false,
    isObsolete: false
  }

for jade template:

	html(class="#{ua&&ua.join(' ')||''}")
	<!-- <html class="ua-wk ua-wk40 ua-win"> -->

License

MIT

Keywords

FAQs

Package last updated on 21 Nov 2014

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