`os.cpus()` for node and the browser
npm install cpus[travis-image]: https://img.shields.io/travis/feross/cpus/master.svg
[travis-url]: https://travis-ci.org/feross/cpus
[npm-image]: https://img.shields.io/npm/v/cpus.svg
[npm-url]: https://npmjs.org/package/cpus
[downloads-image]: https://img.shields.io/npm/dm/cpus.svg
[downloads-url]: https://npmjs.org/package/cpus
[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
[standard-url]: https://standardjs.com
#### os.cpus() for node and the browser
[![saucelabs][saucelabs-image]][saucelabs-url]
[saucelabs-image]: https://saucelabs.com/browser-matrix/cpus.svg
[saucelabs-url]: https://saucelabs.com/u/cpus
Returns an array of objects containing information about each CPU/core installed:
model, speed (in MHz), and times (an object containing the number of milliseconds the
CPU/core spent in: user, nice, sys, idle, and irq).
See the node.js documentation foros.cpus().
In the browser, the navigator.hardwareConcurrency API is used, when available.
``bash`
npm install cpus
`js``
var cpus = require('cpus')
console.log(cpus().length) // 4
MIT. Copyright (C) Feross Aboukhadijeh.