diff --git a/src/ua-parser.js b/src/ua-parser.js index b2ac7f1..aea21a7 100755 --- a/src/ua-parser.js +++ b/src/ua-parser.js @@ -478,7 +478,7 @@ ], [MODEL, [VENDOR, 'Sony'], [TYPE, MOBILE]], [ /\s(ouya)\s/i, // Ouya - /(nintendo)\s([wids3u]+)/i // Nintendo + /(nintendo)\s([wids3utch]+)/i // Nintendo ], [VENDOR, MODEL, [TYPE, CONSOLE]], [ /android.+;\s(shield)\sbuild/i // Nvidia @@ -753,7 +753,7 @@ ], [VERSION, [NAME, 'Chromecast']], [ // Console - /(nintendo|playstation)\s([wids34portablevu]+)/i, // Nintendo/Playstation + /(nintendo|playstation)\s([wids34portablevuch]+)/i, // Nintendo/Playstation // GNU/Linux based /(mint)[\/\s\(]?(\w*)/i, // Mint diff --git a/test/device-test.json b/test/device-test.json index 29fb151..9e5e03d 100644 --- a/test/device-test.json +++ b/test/device-test.json @@ -729,6 +729,15 @@ "type": "console" } }, + { + "desc": "Nintendo Switch", + "ua": "Mozilla/5.0 (Nintendo Switch; WifiWebAuthApplet) AppleWebKit/606.4 (KHTML, like Gecko) NF/6.0.1.15.4 NintendoBrowser/5.1.0.20393", + "expect": { + "vendor": "Nintendo", + "model": "Switch", + "type": "console" + } + }, { "desc": "Galaxy Nexus", "ua": "Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19", diff --git a/test/os-test.json b/test/os-test.json index 1b05ddc..ce6ec52 100644 --- a/test/os-test.json +++ b/test/os-test.json @@ -261,12 +261,12 @@ } }, { - "desc" : "Nintendo", - "ua" : "", + "desc" : "Nintendo Switch", + "ua" : "Mozilla/5.0 (Nintendo Switch; WifiWebAuthApplet) AppleWebKit/606.4 (KHTML, like Gecko) NF/6.0.1.15.4 NintendoBrowser/5.1.0.20393", "expect" : { - "name" : "", - "version" : "" + "name" : "Nintendo", + "version" : "Switch" } }, {