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

connect-ua-parser

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-ua-parser

Integrates ua-parser with connect/express

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

connect-ua-parser

Integrates ua-parser with connect/express

Installation

npm install connect-ua-parser

Usage

Initialize the middleware with :

var connect = require('connect'),
    connectUaParser = require('connect-ua-parser'),
    app = connect();

app.use(connectUaParser());

By default, the middleware will parse the user-agent header using the ua-parser library and attach it to the request object at req.useragent.

Options

requestKey

Specifies the key on the request object the parsed user-agent info will be attached. Defaults to useragent.

ua

Specifies whether to use the ua parser from the ua-parser library. Defaults to true.

os

Specifies whether to use the os parser from the ua-parser library. Defaults to true.

device

Specifies whether to use the device parser from the ua-parser library. Defaults to true.

Keywords

FAQs

Package last updated on 21 Dec 2013

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