The Universal Device Detection library will parse any User Agent and detect the browser, operating system, device used (desktop, tablet, mobile, tv, cars, console, etc.), brand and model.
Why do you think that https://github.com/jdorn/sql-formatter is a good alternative to Device Detector