Socket
Socket
Sign inDemoInstall

isbot

Package Overview
Dependencies
0
Maintainers
2
Versions
123
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install
Previous1345
13Next

4.3.0

Diff

Changelog

Source

4.3.0

  • Accept undefined in place of user agent string to allow headers property to be used "as is" (request.headers["user-agent"])
omrilotan
published 4.2.0 •

Changelog

Source

4.2.0

  • Accept null in place of user agent string to allow header value to be used "as is" (request.headers.get("user-agent"))
omrilotan
published 4.1.2 •

omrilotan
published 3.8.0 •

Changelog

Source

3.8.0

  • Add "isbot.isbot" property and "isbot" named export to allow easier migration to version 4
omrilotan
published 4.1.1 •

Changelog

Source

4.1.1

  • Recognise browsers with GMS Core (Google's Play Services) as natural non-bot browsers
  • A slightly neater typescript decleration file
  • Adjust "bot" pattern to recognise bot as a standalone word or word suffix (excluding "Cubot")
  • Recognise "rest-client" as a bot
omrilotan
published 3.7.1-deprecated •

omrilotan
published 4.1.0 •

Changelog

Source

4.1.0

  • Add createIsbotFromList: Create a custom isbot function from a list of string representation patterns
  • Recognise browsers with HMS Core (Huawei Mobile Services) as natural non-bot browsers
omrilotan
published 4.0.0 •

Changelog

Source

4.0.0

Breaking changes

This change is meant to reduce the size of the package and improve performance by building the regular expression in build time instead of runtime.

  • Change interface

    • Remove default import. Use named import instead: import { isbot } from "isbot";
    • Drop isbot attached functions from the interface. isbot.<SOMETHING> is no longer supported
  • Drop support for EOL node versions

New features

import { <SOMETHING> }  from "isbot";

| import | Type | Description | | ------------- | --------------------------------------------------- | ------------------------------------------------------------------------- | | pattern | {RegExp} | The regular expression used to identify bots | | list | {string[]} | List of all individual pattern parts | | isbotMatch | {(userAgent: string): string | null} | The substring matched by the regular expression | | isbotMatches | {(userAgent: string): string[]} | All substrings matched by the regular expression | | isbotPattern | {(userAgent: string): string | null} | The regular expression used to identify bot substring in the user agent | | isbotPatterns | {(userAgent: string): string[]} | All regular expressions used to identify bot substrings in the user agent | | createIsbot | {(pattern: RegExp): (userAgent: string): boolean} | Create a custom isbot function |

omrilotan
published 4.0.0-rc.1ca96c0 •

omrilotan
published 3.7.1 •

Changelog

Source

3.7.1

  • Replace "ghost" with "inspect" to avoid false positives
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc