1
0
mirror of https://github.com/lancedikson/bowser synced 2024-10-27 20:34:22 +00:00

update the constant names

This commit is contained in:
Ricardo Rauber Pereira 2019-04-23 10:15:02 +01:00
parent 8e49696d02
commit d0959a43c4

View File

@ -594,10 +594,10 @@ const browsersList = [
* in order to decide what regexp exactly we want to apply * in order to decide what regexp exactly we want to apply
* (as there is a specific decision based on that conclusion) * (as there is a specific decision based on that conclusion)
*/ */
const regexpWithoutParenthesis = /^(.*)\/(.*) /; const regexpWithoutDeviceSpec = /^(.*)\/(.*) /;
const regexpWithParenthesis = /^(.*)\/(.*)[ \t]\((.*)/; const regexpWithDeviceSpec = /^(.*)\/(.*)[ \t]\((.*)/;
const hasDeviceSpec = ua.search('\\(') !== -1; const hasDeviceSpec = ua.search('\\(') !== -1;
const regexp = hasDeviceSpec ? regexpWithoutParenthesis : regexpWithParenthesis; const regexp = hasDeviceSpec ? regexpWithoutDeviceSpec : regexpWithDeviceSpec;
return { return {
name: Utils.getFirstMatch(regexp, ua), name: Utils.getFirstMatch(regexp, ua),
version: Utils.getSecondMatch(regexp, ua), version: Utils.getSecondMatch(regexp, ua),