{"id":17399234,"url":"https://github.com/feross/cpus","last_synced_at":"2025-07-16T23:32:13.014Z","repository":{"id":62354755,"uuid":"49393076","full_name":"feross/cpus","owner":"feross","description":"os.cpus() for node and the browser","archived":false,"fork":false,"pushed_at":"2020-05-25T04:23:28.000Z","size":20,"stargazers_count":25,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-01T07:51:46.670Z","etag":null,"topics":["cpus","javascript","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/feross.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-11T00:51:57.000Z","updated_at":"2024-09-25T09:10:53.000Z","dependencies_parsed_at":"2022-10-31T10:46:21.170Z","dependency_job_id":null,"html_url":"https://github.com/feross/cpus","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/feross/cpus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Fcpus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Fcpus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Fcpus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Fcpus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/feross","download_url":"https://codeload.github.com/feross/cpus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Fcpus/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265550336,"owners_count":23786544,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpus","javascript","nodejs"],"created_at":"2024-10-16T15:13:43.535Z","updated_at":"2025-07-16T23:32:12.544Z","avatar_url":"https://github.com/feross.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cpus [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]\n\n[travis-image]: https://img.shields.io/travis/feross/cpus/master.svg\n[travis-url]: https://travis-ci.org/feross/cpus\n[npm-image]: https://img.shields.io/npm/v/cpus.svg\n[npm-url]: https://npmjs.org/package/cpus\n[downloads-image]: https://img.shields.io/npm/dm/cpus.svg\n[downloads-url]: https://npmjs.org/package/cpus\n[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg\n[standard-url]: https://standardjs.com\n\n#### `os.cpus()` for node and the browser\n\n[![saucelabs][saucelabs-image]][saucelabs-url]\n\n[saucelabs-image]: https://saucelabs.com/browser-matrix/cpus.svg\n[saucelabs-url]: https://saucelabs.com/u/cpus\n\nReturns an array of objects containing information about each CPU/core installed:\nmodel, speed (in MHz), and times (an object containing the number of milliseconds the\nCPU/core spent in: user, nice, sys, idle, and irq).\n\nSee the [node.js documentation](https://nodejs.org/api/os.html#os_os_cpus) for\n`os.cpus()`.\n\nIn the browser, the `navigator.hardwareConcurrency` API is used, when available.\n\n## install\n\n```bash\nnpm install cpus\n```\n\n## usage\n\n```js\nvar cpus = require('cpus')\nconsole.log(cpus().length) // 4\n```\n\n## license\n\nMIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeross%2Fcpus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffeross%2Fcpus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeross%2Fcpus/lists"}