cloudflare/speedtest ? reverse-engineered prompt

Reverse engineered prompt

Build me a small TypeScript package that measures internet connection quality from the browser by testing against Cloudflare’s edge network.

I want it to act like a speed test engine, not a full UI, so other apps can plug it in and listen for progress. It should measure latency, download speed, upload speed, and packet loss, then give back a clear results object with a simple summary at the end. It should be able to start automatically, pause, restart, and report running state, result updates, errors, and when it is finished.

Use browser timing info where that makes sense, and make the test flow customizable so I can change the order and size of the measurements if needed. Include a small example showing how to create it and log the final results. If you need to check current docs for browser timing or any Cloudflare details, look them up online first.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab