Add CPU test & increment minor version

This commit is contained in:
Faisal Salman
2013-04-04 13:46:09 +07:00
parent ecf8f7a849
commit dc20c12b63
7 changed files with 98 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
// UAParser.js v0.5.27
// UAParser.js v0.6.0
// Lightweight JavaScript-based User-Agent string parser
// https://github.com/faisalman/ua-parser-js
//
@@ -100,6 +100,8 @@
// sanitize match using given regex
result[q[0]] = match ? match.replace(q[1], q[2]) : undefined;
}
} else if (q.length == 4) {
result[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined;
}
} else {
result[q] = match ? match : undefined;
@@ -276,6 +278,7 @@
],
cpu : [[
/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i // AMD64
], [[ARCHITECTURE, 'amd64']], [
@@ -283,7 +286,7 @@
], [[ARCHITECTURE, 'ia32']], [
/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i // PowerPC
], [[ARCHITECTURE, /ower/, '']], [
], [[ARCHITECTURE, /ower/, '', util.lowerize]], [
/(sun4\w)[;\)]/i // SPARC
], [[ARCHITECTURE, 'sparc']], [

File diff suppressed because one or more lines are too long