1 | var global = require('../internals/global');
|
2 | var userAgent = require('../internals/user-agent');
|
3 |
|
4 | var process = global.process;
|
5 | var versions = process && process.versions;
|
6 | var v8 = versions && versions.v8;
|
7 | var match, version;
|
8 |
|
9 | if (v8) {
|
10 | match = v8.split('.');
|
11 | version = match[0] + match[1];
|
12 | } else if (userAgent) {
|
13 | match = userAgent.match(/Chrome\/(\d+)/);
|
14 | if (match) version = match[1];
|
15 | }
|
16 |
|
17 | module.exports = version && +version;
|