isCrawler

Type:Function
Status:stable
Since:1.0.0
Platform:js
@blackbyte.sugar.js.is

Detect if request is from a crawler (google bot, etc…) or not

Params

  1. ua”navigator.userAgent”String

    The user agent on which to make the test

Return

  1. -Boolean

    true if is a crawler, false if not

Example

import { isCrawler } from '@blackbyte/sugar/is'
if (isCrawler()) {
  // do something cool
}

Todo

  • testsnormal