User-agent string parser for many languages, which does:
parse user-agent strings and returns name/category/version/os/os_version/vendor
works reasonably fast
returns just same results between language implementations
share a test case between language implementations
Woothee implementations are:
Java (and Hive UDF)
Ruby
Perl
Python
PHP
Node.js (browser / node)
Go
Rust
Lua
Why new project?
We needs just same logic over 2 or more programming languages, for use on various frameworks, middlewares and environments.
Most important data of this project is only single set of return values, and set of test cases, for equality of results of another languages implementations.
Demo
User-Agent String:
Parse result:
lang
name
category
os
version
os_version
vendor
js
java
ruby
node
python
php
go
Feedback
Please add issues here if you found wrong result for any user-agents.
Or, tell @tagomoris simply.