[![Build Status](https://travis-ci.org/ylecuyer/isBot.svg)](https://travis-ci.org/ylecuyer/isBot)
[![Node dependencies status](https://david-dm.org/ylecuyer/isBot.svg)](https://david-dm.org/ylecuyer/isBot)
# isBot
A simple JS library that detects bots.
## How it works
isBot runs quickly on page load to detect mobile devices; it then creates a JavaScript object with the results.
## Bots detected by isBot
The following properies of the `isBot` object will either be `true` or `false`
### Googlebot
* `isBot.googlebot`
### Bingbot
* `isBot.bingbot`
### Yahoobot
* `isBot.yahoobot`
### Aggregate Groupings
* `isBot.bot` - any bot
### node.js usage
#####Installation
`npm install isbotjs`
#####Usage
```
var isBot = require('isbotjs');
console.log(isBot(req.headers['user-agent']).any);
```
Based on isMobile by @kaimallea
isBot: 一个简单的JS库,用于检测机器人
版权申诉
10 浏览量
2023-10-13
14:04:20
上传
评论
收藏 5KB ZIP 举报
![avatar](https://profile-avatar.csdnimg.cn/b3bd63a7903244e481cc7ae79fad9368_qq_41221596.jpg!1)
码云笔记
- 粉丝: 2w+
- 资源: 5851
最新资源
- 数据库管理工具:dbeaver-ce-23.0.1-amd64.deb
- 数据库管理工具:dbeaver-ce-24.1.0-x86-64-setup.exe
- 编程实战:基于ASP.NET架构的通用作业批改管理系统(完整源代码+毕设文档)
- 宁波大学每日学习nbuoj题目全解
- 数据库管理工具:dbeaver-ce-24.1.0-stable.x86-64.rpm
- 数据库管理工具:dbeaver-ce-24.1.0-macos-x86-64.dmg
- 指针实现单向链表初学c++者适用
- 毕设项目:通用作业批改管理系统(含源代码+毕设文档+ASP.NET)
- 数据库管理工具:dbeaver-ce-24.0.5-x86-64-setup.exe
- 数据库管理工具:dbeaver-ce-24.0.5-stable.x86-64.rpm
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)