Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

battery-rate

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

battery-rate

Get the rate of (dis)charge of a battery

  • 3.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

battery-rate

Get a battery's (dis)charge rate. Probably only works on Linux.

Example

const batteryRate = require('battery-rate');

batteryRate('BAT1', (error, rate) => {
  if (error) {
    throw error;
  }

  console.log(rate);
  // => -9.106
});

Installation

$ npm install battery-rate

API

const battery-rate = require('battery-rate');

battery-rate([battery='BAT0'], callback)

Calls callback(error, rate), where error is any Error encountered and Number rate is the current rate of charge/discharge in watts of String battery (which defaults to 'BAT0').

Keywords

FAQs

Package last updated on 15 Oct 2023

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc