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

is-ua-bot

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-ua-bot

useragent parsing for bot identification

  • 1.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

is-ua-bot

An improved user-agent parser to detect bots

Build Status

Installation

$ npm install is-ua-bot

Usage

const isBot = require('is-ua-bot')

// just for testing:
const assert = require('assert')

// identifies googlebot as bot (returns true)
assert(isBot('Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)'))

// Android Pixel is not a bot (returns false)
assert(!isBot('Android 7.1; Pixel Build/NDE63P)'))

Tests

We have a set of Bot agents in ./test/data/bots.js and a set of known non-bots in ./text/data/not-bots.js. Please contribute!

Run tests

npm test

Author

follow

worthy of a tip? ⚡ Lightning Bitcoin Tips Accepted https://tippin.me/@antic

Keywords

FAQs

Package last updated on 26 Mar 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