isBot function

bool isBot(
  1. Browser? browser
)

Check if a browser is a bot/crawler

Implementation

bool isBot(Browser? browser) {
  if (browser == null) return false;
  return browser.type == 'crawler' ||
      browser.type == 'fetcher' ||
      browser.type == 'cli' ||
      browser.type == 'library';
}