source: imaps-frontend/node_modules/core-js/internals/environment.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: 877 bytes
Line 
1'use strict';
2/* global Bun, Deno -- detection */
3var globalThis = require('../internals/global-this');
4var userAgent = require('../internals/environment-user-agent');
5var classof = require('../internals/classof-raw');
6
7var userAgentStartsWith = function (string) {
8 return userAgent.slice(0, string.length) === string;
9};
10
11module.exports = (function () {
12 if (userAgentStartsWith('Bun/')) return 'BUN';
13 if (userAgentStartsWith('Cloudflare-Workers')) return 'CLOUDFLARE';
14 if (userAgentStartsWith('Deno/')) return 'DENO';
15 if (userAgentStartsWith('Node.js/')) return 'NODE';
16 if (globalThis.Bun && typeof Bun.version == 'string') return 'BUN';
17 if (globalThis.Deno && typeof Deno.version == 'object') return 'DENO';
18 if (classof(globalThis.process) === 'process') return 'NODE';
19 if (globalThis.window && globalThis.document) return 'BROWSER';
20 return 'REST';
21})();
Note: See TracBrowser for help on using the repository browser.