@ydbjs/core
Version:
Core driver for YDB: manages connections, endpoint discovery, authentication, and service client creation. Foundation for all YDB client operations.
22 lines • 667 B
JavaScript
/**
* Detects the current JavaScript runtime and returns formatted user agent string
*/
export const detectRuntime = function detectRuntime() {
let runtime;
let version;
if (typeof globalThis.Deno !== 'undefined') {
runtime = 'deno';
version = globalThis.Deno.version.deno;
}
else if (typeof globalThis.Bun !== 'undefined') {
runtime = 'bun';
version = globalThis.Bun.version;
}
else {
runtime = 'node';
version = process.versions.node;
}
let platform = `${process.platform}-${process.arch}`;
return `${runtime}/${version} (${platform})`;
};
//# sourceMappingURL=runtime.js.map