source: imaps-frontend/node_modules/core-js/internals/environment-v8-version.js

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 886 bytes
Line 
1'use strict';
2var globalThis = require('../internals/global-this');
3var userAgent = require('../internals/environment-user-agent');
4
5var process = globalThis.process;
6var Deno = globalThis.Deno;
7var versions = process && process.versions || Deno && Deno.version;
8var v8 = versions && versions.v8;
9var match, version;
10
11if (v8) {
12 match = v8.split('.');
13 // in old Chrome, versions of V8 isn't V8 = Chrome / 10
14 // but their correct versions are not interesting for us
15 version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
16}
17
18// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
19// so check `userAgent` even if `.v8` exists, but 0
20if (!version && userAgent) {
21 match = userAgent.match(/Edge\/(\d+)/);
22 if (!match || match[1] >= 74) {
23 match = userAgent.match(/Chrome\/(\d+)/);
24 if (match) version = +match[1];
25 }
26}
27
28module.exports = version;
Note: See TracBrowser for help on using the repository browser.