Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
community-cordova-plugin-cpu
Advanced tools
I dedicate a considerable amount of my free time to developing and maintaining many cordova plugins for the community (See the list with all my maintained plugins). To help ensure this plugin is kept updated, new features are added and bugfixes are implemented quickly, please donate a couple of dollars (or a little more if you can stretch) as this will help me to afford to dedicate time to its maintenance. Please consider donating if you're using this plugin in an app that makes you money, or if you're asking for new features or priority bug fixes. Thank you!
The CpuManager
is a TypeScript class designed to provide information about the CPU (Central Processing Unit) of a device. This README file aims to provide a detailed description of the code and its usage.
To use the CpuManager
class, you need to install it as a dependency in your project:
cordova plugin add community-cordova-plugin-cpu
The CpuManager
class exports methods to retrieve essential information about the device's CPU, such as architecture, core count, frequency, model, and more. It uses TypeScript and is intended for use in Node.js or other JavaScript environments.
To utilize the CpuManager
class in your project, follow these steps:
CpuManager
class into your TypeScript/JavaScript file:import CpuManager from 'community-cordova-plugin-cpu';
CpuManager
class:declare var CpuPlugin: CpuManager;
getCpuInfo
method to retrieve CPU information asynchronously:cpuManager.getCpuInfo()
.then((cpuInfo) => {
console.log('CPU Information:', cpuInfo);
})
.catch((error) => {
console.error('Error fetching CPU information:', error);
});
or
var cpuObj = await CpuPlugin.getCpuInfo();
CpuManager
getCpuInfo(): Promise<ICpu>
Retrieves detailed information about the device's CPU.
Returns: A Promise that resolves to an ICpu
object containing the following properties:
cpuArchitecture
: A string representing the CPU architecture (e.g., ARMv7, ARMv8, x86, x86_64, etc.).cpuCores
: The number of CPU cores available on the device.cpuFrequencyMax
: The maximum CPU frequency in MHz.cpuFrequencyMin
: The minimum CPU frequency in MHz.cpuModel
: The CPU model or identifier (number).primaryABI
: The primary ABI (Application Binary Interface) used by the CPU.secondaryABI
: The secondary ABI (Application Binary Interface) if available.cpuFrequencyInfo
: An array of objects containing CPU core-specific information, each with the following properties:
coreIndex
: The core index or identifier (number).currentFrequency
: The current CPU frequency for the core in MHz.ICpu
An interface describing the CPU information structure:
cpuArchitecture
(string): CPU architecture, e.g., ARMv7, ARMv8, x86, x86_64, etc.cpuCores
(number): Number of CPU cores available on the device.cpuFrequencyMax
(string): Maximum CPU frequency in MHz.cpuFrequencyMin
(string): Minimum CPU frequency in MHz.cpuModel
(number): CPU model or identifier.primaryABI
(string): Primary ABI (Application Binary Interface).secondaryABI
(string): Secondary ABI (Application Binary Interface) if available.cpuFrequencyInfo
(ICpuCores[]): Array of CPU core-specific information.ICpuCores
An interface describing CPU core-specific information:
coreIndex
(number): Core index or identifier.currentFrequency
(string): Current CPU frequency for the core in MHz.Contributions to this project are welcome. If you encounter issues, have suggestions, or want to contribute improvements, please feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.
Feel free to use the CpuManager
class in your projects to retrieve and utilize CPU information effectively. If you have any questions or need assistance, please refer to the Issues section of the GitHub repository for this project.
FAQs
A plugin for full detail for cpu
The npm package community-cordova-plugin-cpu receives a total of 2 weekly downloads. As such, community-cordova-plugin-cpu popularity was classified as not popular.
We found that community-cordova-plugin-cpu demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.