@neofork/devlogr - v0.0.3
    Preparing search index...

    Class TerminalUtils

    Terminal capability detection utilities for cross-platform compatibility. Automatically detects color, Unicode, and other terminal features.

    Index

    Constructors

    Methods

    • Check if the current terminal supports Unicode characters.

      Returns boolean

      True if Unicode symbols can be displayed, false otherwise

    • Check if the current terminal supports ANSI color codes.

      Returns boolean

      True if colors can be displayed, false otherwise

    • Detects if we're running in a CI environment

      Returns boolean

    • Get CI-optimized configuration for better log readability in CI environments.

      CI environments benefit from:

      • Prefixes for better log identification
      • Timestamps for debugging and correlation
      • No icons to avoid Unicode issues in some CI systems
      • Dynamic color/emoji support based on CI capabilities

      Can be disabled via DEVLOGR_DISABLE_CI_DETECTION environment variable.

      Returns {
          showPrefix: boolean;
          showTimestamp: boolean;
          showIcons: boolean;
          showEmojis: boolean;
          useColors: boolean;
          supportsEmoji: boolean;
      }

      CI-specific configuration overrides

    • Detects if the current environment supports emoji characters.

      Returns boolean

      True if emoji can be displayed, false otherwise

    • Get ASCII fallback symbols for terminals that don't support Unicode.

      Returns Record<string, string>

      Object mapping log levels to ASCII symbols