🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

robots-txt

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

robots-txt

Check user agents against robots.txt files

Source
npmnpm
Version
0.0.2
Version published
Weekly downloads
244
-15.57%
Maintainers
1
Weekly downloads
 
Created
Source

robots-txt

Handles checking of robots.txt. handles concurrent requests and caching.

usage

var robots = require('robots-txt'),
    level  = require('level');

var bot = robots({
  db: level('./robots-txt-cache'),
  ttl: 1000 * 60 * 60 * 24 // one day
});

bot.isAllowed('woobot', 'http://www.woorank.com/my/path')
  .then(function (isAllowed) {
    // ...
  });

This module fetches robots.txt files and optionally caches them in a level-db. parsing and checking of robots.txt files is done by secondary modules robots-txt-parse and robots-txt-guard and can be used separately.

FAQs

Package last updated on 20 Oct 2014

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