hono icon indicating copy to clipboard operation
hono copied to clipboard

feat(timing): add wrapTime to simplify usage

Open PassiDel opened this issue 2 months ago • 2 comments

Hey! I added this wrapTime function because I always copy it as "utils" in my own projects. It makes it easier to track the duration of promises. I hope the test cases are good enough.

Best regards!

The author should do the following, if applicable

  • [x] Add tests
  • [x] Run tests
  • [x] bun run format:fix && bun run lint:fix to format the code
  • [x] Add TSDoc/JSDoc to document the code

PassiDel avatar Nov 15 '25 14:11 PassiDel

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 91.50%. Comparing base (4960c06) to head (531898f).

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #4519      +/-   ##
==========================================
- Coverage   91.52%   91.50%   -0.02%     
==========================================
  Files         172      172              
  Lines       11221    11244      +23     
  Branches     3255     3258       +3     
==========================================
+ Hits        10270    10289      +19     
- Misses        950      954       +4     
  Partials        1        1              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Nov 15 '25 14:11 codecov[bot]

Hi @PassiDel

This is a good feature! Looks good to me. I'll merge this later and include the feature in the next minor version 4.11. Thank you!

yusukebe avatar Nov 27 '25 08:11 yusukebe