Skip to content

Conversation

tbeseda
Copy link
Owner

@tbeseda tbeseda commented May 2, 2024

[note from tbeseda (the rest is Copilot): I'm testing out Copilot Workspace trial]

Related to #1

Adds support for merging header-timers values with existing Server-Timing headers without overwriting, and updates documentation and tests accordingly.

  • New Feature Implementation:
    • Introduces a mergeWithExisting method in index.js that allows merging header-timers values with existing Server-Timing headers, supporting both string and object formats for existing headers.
    • Modifies the toObject method to facilitate merging by handling existing headers passed as either a string or an object, including cases where the Server-Timing header is already present.
  • Documentation Updates:
    • Enhances the README.md file with a new section and examples on how to use the mergeWithExisting method for merging header-timers values with existing Server-Timing headers.
  • Testing Enhancements:
    • Adds tests in index-test.js to verify the correct functionality of the mergeWithExisting method, including tests for merging with existing headers provided as both strings and objects.

For more details, open the Copilot Workspace session.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant