Skip to content
forked from omrilotan/isbot

💻 Node.js module that detects bots/crawlers/spiders via the user agent

Notifications You must be signed in to change notification settings

OmgImAlexis/isbot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

isbot

Build Status

install

$ npm install isbot --save

usage

isBot(req.headers['user-agent'])

isBot("Googlebot/2.1 (+http://www.google.com/bot.html)") // true

isBot("Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36") // false

extending

isBot("Mozilla/5.0") // false

var myList = [
    'istat',
    'newspaper',
    'httpclient',
    '^mozilla/\\d\\.\\d$',
];

isBot.extend(myList);

isBot("Mozilla/5.0") // true

About

💻 Node.js module that detects bots/crawlers/spiders via the user agent

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%