+1
-1
| { | ||
| "name": "node-isbot", | ||
| "version": "0.0.6", | ||
| "version": "0.0.7", | ||
| "description": "isbot for nodejs, Contains most of the world's bot or spider", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
+23
-13
| # node-isbot | ||
| [](https://nodei.co/npm/node-isbot/) | ||
| [](http://badge.fury.io/js/node-isbot) | ||
@@ -8,3 +12,3 @@ | ||
| $ npm install node-isbot --save | ||
| $ npm install node-isbot --save | ||
@@ -14,19 +18,25 @@ ### usage | ||
| const http = require('http'); | ||
| const isbot = require('node-isbot'); | ||
| isbot(req.headers['user-agent']) | ||
| isbot("Googlebot/2.1 (+http://www.google.com/bot.html)") // true | ||
| isbot("Googlebot") // true | ||
| isbot("yahoo") // true | ||
| isbot("Sogou Pic Spider") // true | ||
| isbot("PHP") // true | ||
| isbot("Baiduspider") // true | ||
| isbot("360Spider") // true | ||
| isbot("java/") // true | ||
| isbot("Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36") // false | ||
| http.createServer(function(req, res, next) { | ||
| isbot(req.headers['user-agent']); | ||
| isbot("Googlebot/2.1 (+http://www.google.com/bot.html)"); // true | ||
| isbot("Googlebot"); // true | ||
| isbot("yahoo"); // true | ||
| isbot("Sogou Pic Spider"); // true | ||
| isbot("PHP"); // true | ||
| isbot("Baiduspider"); // true | ||
| isbot("360Spider"); // true | ||
| isbot("java/"); // true | ||
| isbot("Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36"); // false | ||
| }); | ||
| ### test | ||
@@ -56,2 +66,2 @@ | ||
| http_client | ||
| yahoo | ||
| yahoo |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
23466
0.99%65
20.37%