Utilities for the number of logical cores.
npm install hardware-concurrencyUtilities for the number of logical cores.
``sh`
npm install --save hardware-concurrencyor
yarn add hardware-concurrency
`ts`
function maxCores(): number
Take the number of cores.
Equivalent to navigator.hardwareConcurrency or os.cpus().length.
`ts`
function halfCores(): number
Take half the number of cores and round up.
`ts`
function doubleCores(): number
Take double the number of cores.
`ts`
function minus1Cores(): number
Equivalent to Math.max(maxCores() - 1, 1).
`ts`
function minusCores(num: number): number
Equivalent to Math.max(maxCores() - num, 1)`.