3rd-Eden / useragent

Useragent parser for Node.js, ported from browserscope.org
MIT License
898 stars 139 forks source link

Add regexes for PS4 UA and OS #45

Closed jphpsf closed 10 years ago

jphpsf commented 10 years ago

I am using Karma to run unit tests in various browsers including a PlayStation 4 web browser.

I noticed that Karma would output Other 0.0.0 (Other 0.0.0) when running on the PS4. I've added a couple regexes to address the issue. After the change, useragent returns PS4 WebKit 536.26.0 (PlayStation 4 1.62).

I locally unit tested the change with a new test case in test/parser.test.js but I have not added it to this pull requests. Please let me know if you would like me to add it.

cc @3rd-Eden

3rd-Eden commented 10 years ago

The regexps file is compiled from a dedicated parser library. This yaml library should be updated not the compiled source. See https://raw.githubusercontent.com/tobie/ua-parser/master/regexes.yaml