Socket
Socket
Sign inDemoInstall

cpus

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

cpus

`os.cpus()` for node and the browser


Version published
Maintainers
1
Weekly downloads
2,712
decreased by-5.37%

Weekly downloads

Readme

Source

cpus travis npm downloads javascript style guide

os.cpus() for node and the browser

saucelabs

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 for os.cpus().

In the browser, the navigator.hardwareConcurrency API is used, when available.

install

npm install cpus

usage

var cpus = require('cpus')
console.log(cpus().length) // 4

license

MIT. Copyright (C) Feross Aboukhadijeh.

Keywords

FAQs

Last updated on 10 May 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc