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

browser_sniffer

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browser_sniffer

  • 2.4.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Build Status Gem Version

BrowserSniffer

Description

Parses user agent strings and boils it all down to a few simple classifications.

Installation

Add this line to your application's Gemfile:

gem "browser_sniffer"

And then execute:

$ bundle install

Or install it yourself as:

$ git clone https://github.com/Shopify/browser_sniffer && cd browser_sniffer && bundle install && rake install

Usage

require "browser_sniffer"

client_info = BrowserSniffer.new(request.user_agent)
client_info.form_factor           # => :tablet
client_info.browser               # => :safari
client_info.major_browser_version # => 4
client_info.engine                # => :webkit
client_info.major_engine_version  # => 531
client_info.os                    # => :ios
client_info.os_version            # => 3.2

Contributing

Fork, branch & pull request.

Licensing

Based off UAParser.js

Copyright (c) 2013 Shopify
Copyright (c) 2012-2013 Faisalman fyzlman@gmail.com
Dual licensed under GPLv2 & MIT

FAQs

Package last updated on 12 Jan 2024

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