Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

isbot

Package Overview
Dependencies
Maintainers
0
Versions
134
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

isbot - npm Package Versions

1
14

4.4.0

Diff

Changelog

Source

4.4.0

  • Add a naive fallback pattern for engines that do not support lookbehind in regular expressions
  • Add isbotNaive function to identify bots using a naive approach (simpler and faster)
omrilotan
published 4.3.0 •

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 •

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc