is-web-crawler
Version:
A light weight JS library to check if a user agent is a web crawler.
12 lines (8 loc) • 399 B
text/typescript
import { WebCrawlerService } from './web-crawler-service';
const singleton = new WebCrawlerService();
export const isCrawlerUserAgent = (topCrawlersToCheck?: number): boolean => {
return singleton.isCrawlerUserAgent(topCrawlersToCheck);
}
export const isCrawler = (userAgent: string, topCrawlersToCheck?: number): boolean => {
return singleton.isCrawler(userAgent, topCrawlersToCheck);
}