kyrie
    Preparing search index...

    Function highlight_value

    • Highlights a JavaScript value with colors

      Parameters

      • value: unknown

        The value to highlight

      • Optionaloptions: Options

        Optional configuration for highlighting

      Returns string

      The highlighted string with ANSI color codes

      const obj = {name: "John", age: 30};
      const highlighted = highlight_value(obj);
      console.log(highlighted); // Outputs colorized representation
      const arr = [1, 2, 3, "hello", true];
      const highlighted = highlight_value(arr, { palette: forestPalette });
      console.log(highlighted);