1.9.6 • Published 3 years ago

@rearguard/is-bot v1.9.6

Weekly downloads
28
License
MIT
Repository
github
Last release
3 years ago

@rearguard/is-bot.

Installation.

npm i @rearguard/is-bot

Intro.

@rearguard/is-bot is a validator for User-Agent strings, it allows efficiently detecting bots, crawlers and scrappers. This library stays up to date with live data provided by https://www.myip.ms

Usage.

const {isBot} = require('@rearguard/is-bot');

isBot(
  'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36',
); // false

isBot(
  'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36',
); // => false
isBot(
  'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)',
); // => true

Benchmarks.

@rearguard/is-bot is fast and intuitive, you can find benchmarks against similar libraries in the /bench folder.

Tests.

yarn test
1.9.6

3 years ago

1.9.5

3 years ago

1.9.4

3 years ago

1.9.3

3 years ago

1.9.1

3 years ago

1.9.0

3 years ago

1.8.0

3 years ago

1.9.2

3 years ago

1.7.1

3 years ago

1.7.0

3 years ago

1.6.0

3 years ago

1.5.0

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago