A simple node.js binding to Google's cpu_features library for obtaining information about installed CPU(s)
Installations
npm install cpu-features
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>=10.0.0
Node Version
20.12.0
NPM Version
10.5.0
Contributors
Unable to fetch Contributors
Languages
C++ (76.64%)
JavaScript (18.64%)
Python (4.72%)
Developer
mscdex
Download Statistics
Total Downloads
240,884,675
Last Day
203,329
Last Week
1,193,052
Last Month
10,878,712
Last Year
114,912,031
GitHub Statistics
43 Stars
50 Commits
15 Forks
4 Watching
2 Branches
2 Contributors
Package Meta Information
Latest Version
0.0.10
Package Id
cpu-features@0.0.10
Unpacked Size
562.52 kB
Size
109.85 kB
File Count
144
NPM Version
10.5.0
Node Version
20.12.0
Publised On
03 May 2024
Total Downloads
Cumulative downloads
Total Downloads
240,884,675
Last day
-9.3%
203,329
Compared to previous day
Last week
-51.8%
1,193,052
Compared to previous week
Last month
-6.1%
10,878,712
Compared to previous month
Last year
59.2%
114,912,031
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
2
Dev Dependencies
2
Description
A simple node.js binding to cpu_features for obtaining information about installed CPU(s).
Requirements
- node.js -- v10.0.0 or newer
- An appropriate build environment -- see node-gyp's documentation
Install
npm install cpu-features
Example
1 // Generally it's a good idea to just call this once and 2 // reuse the result since `cpu-features` does not cache 3 // the result itself. 4 const features = require('cpu-features')(); 5 6 console.log(features); 7 // example output: 8 // { arch: 'x86', 9 // brand: 'Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz', 10 // family: 6, 11 // model: 58, 12 // stepping: 9, 13 // uarch: 'INTEL_IVB', 14 // flags: 15 // { fpu: true, 16 // tsc: true, 17 // cx8: true, 18 // clfsh: true, 19 // mmx: true, 20 // aes: true, 21 // erms: true, 22 // f16c: true, 23 // sse: true, 24 // sse2: true, 25 // sse3: true, 26 // ssse3: true, 27 // sse4_1: true, 28 // sse4_2: true, 29 // avx: true, 30 // pclmulqdq: true, 31 // cx16: true, 32 // popcnt: true, 33 // rdrnd: true, 34 // ss: true } }
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
0 existing vulnerabilities detected
Reason
0 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 1
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/ci.yml:1
- Warn: no topLevel permission defined: .github/workflows/lint.yml:1
- Info: no jobLevel write permissions found
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
Project has not signed or included provenance with any releases.
Details
- Warn: release artifact v0.0.2 not signed: https://api.github.com/repos/mscdex/cpu-features/releases/53808352
- Warn: release artifact v0.0.2 does not have provenance: https://api.github.com/repos/mscdex/cpu-features/releases/53808352
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/mscdex/cpu-features/ci.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/mscdex/cpu-features/ci.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/mscdex/cpu-features/ci.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/mscdex/cpu-features/ci.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/mscdex/cpu-features/ci.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/mscdex/cpu-features/ci.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:66: update your workflow using https://app.stepsecurity.io/secureworkflow/mscdex/cpu-features/ci.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/mscdex/cpu-features/lint.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/mscdex/cpu-features/lint.yml/master?enable=pin
- Warn: containerImage not pinned by hash: deps/cpu_features/.github/workflows/Dockerfile:3: pin your Docker image by updating alpine:edge to alpine:edge@sha256:f4b9f111e2c5290552a920590dd48dc58f5ea1cacda6e25b0a2718974d090cf0
- Warn: containerImage not pinned by hash: deps/cpu_features/cmake/ci/docker/amd64/Dockerfile:3
- Warn: containerImage not pinned by hash: deps/cpu_features/cmake/ci/docker/amd64/Dockerfile:21
- Warn: containerImage not pinned by hash: deps/cpu_features/cmake/ci/docker/amd64/Dockerfile:25
- Warn: containerImage not pinned by hash: deps/cpu_features/cmake/ci/docker/amd64/Dockerfile:31
- Warn: containerImage not pinned by hash: deps/cpu_features/cmake/ci/docker/amd64/Dockerfile:36
- Warn: containerImage not pinned by hash: deps/cpu_features/cmake/ci/docker/amd64/Dockerfile:39
- Warn: containerImage not pinned by hash: deps/cpu_features/cmake/ci/docker/amd64/Dockerfile:43
- Warn: containerImage not pinned by hash: deps/cpu_features/cmake/ci/docker/amd64/Dockerfile:47
- Warn: containerImage not pinned by hash: deps/cpu_features/cmake/ci/docker/toolchain/Dockerfile:3
- Warn: containerImage not pinned by hash: deps/cpu_features/cmake/ci/docker/toolchain/Dockerfile:21
- Warn: containerImage not pinned by hash: deps/cpu_features/cmake/ci/docker/toolchain/Dockerfile:28
- Warn: containerImage not pinned by hash: deps/cpu_features/cmake/ci/docker/toolchain/Dockerfile:32
- Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:27
- Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:53
- Warn: npmCommand not pinned by hash: .github/workflows/lint.yml:26
- Info: 0 out of 9 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 13 containerImage dependencies pinned
- Info: 0 out of 3 npmCommand dependencies pinned
Score
3.2
/10
Last Scanned on 2024-12-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to cpu-features
@types/cpu-features
TypeScript definitions for cpu-features
ssh2-no-cpu-features
SSH2 client and server modules written in pure JavaScript for node.js
node-ssh-no-cpu-features
SSH2 with Promises
cpu-features---stavalfi
A simple binding to Google's cpu_features library for obtaining information about installed CPU(s)