faisalman/ua-parser-js ? reverse-engineered prompt
Reverse engineered prompt
Build me a JavaScript library that can look at a user agent string and tell me what browser, operating system, CPU, device type, and model it came from, plus whether it looks like a bot, crawler, app, or AI agent.
I want it to work both in the browser and in Node, and I’d like it to be easy to use with a simple API that gives back a clean object with the parsed results. If current docs or browser hints support matter, please include that too. Make sure it ships with good TypeScript support, sensible defaults, and a few examples in the README showing how to use it in real code.
Please also add tests for common browsers, phones, tablets, desktop OSes, bots, and a few weird user agents so the parser feels reliable. If you need to check current user agent formats or docs online, go ahead and look them up.
Are you gonna build this?
make sure you review the code using coderabbit