UNPKG

isoconcurrency

Version:

An isomorphic way to get the number of logical cores available.

7 lines (6 loc) 134 B
/* IMPORT */ import os from 'node:os'; /* MAIN */ const concurrency = os.cpus().length || 1; /* EXPORT */ export default concurrency;