ua-parser-js
ua-parser-js copied to clipboard
The length of ua installed through NPM will be truncated
in GitHub source code
UA_MAX_LENGTH = 350;
in NPM source code
UA_MAX_LENGTH = 255;
As a result, some long UA will be truncated,lead to wrong judgment.
For example:
Mozilla/5.0 (Linux; Android 10; ELS-AN00 Build/HUAWEIELS-AN00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/13.2 BDOS/1.0 (HarmonyOS 2.2.0) SP-engine/2.38.0 matrixstyle/0 flyflow/5.26.0.30 lite baiduboxapp/5.26.0.30 (Baidu; P1 10) NABar/1.0
The ua of a popular app named wechat in china was truncated, i hope the code of master branch can be published to npm, thanks.
Here is the ua string
Mozilla/5.0 (Linux; Android 7.1.1; MI 6 Build/NMF26X; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.132 MQQBrowser/6.2 TBS/043807 Mobile Safari/537.36 MicroMessenger/6.6.1.1220(0x26060135) NetType/4G Language/zh_CN MicroMessenger/6.6.1.1220(0x26060135) NetType/4G Language/zh_CN miniProgram
Done