UNPKG

@lodestar/beacon-node

Version:

A Typescript implementation of the beacon chain

17 lines (14 loc) 346 B
let defaultPoolSize: number; try { if (typeof navigator !== "undefined") { defaultPoolSize = navigator.hardwareConcurrency ?? 4; } else { defaultPoolSize = (await import("node:os")).availableParallelism(); } } catch (_e) { defaultPoolSize = 8; } /** * Cross-platform aprox number of logical cores */ export {defaultPoolSize};