battery() code refactoring, cleanup, updated docs

This commit is contained in:
Sebastian Hildebrandt
2020-01-26 10:10:37 +01:00
parent 04abd0c2a9
commit 95f72bbb1a
8 changed files with 51 additions and 12 deletions
+27 -1
View File
@@ -143,7 +143,7 @@
<td>X</td>
<td>X</td>
<td></td>
<td>capacity unit (mWh)</td>
<td>capacity unit (mWh if possible)</td>
</tr>
<tr>
<td></td>
@@ -225,6 +225,32 @@
<td></td>
<td>battery serial</td>
</tr>
<tr>
<td></td>
<td colspan="7">
<h5>Example</h5>
<pre><code class="js">const si = require('systeminformation');
si.battery().then(data => console.log(data));</code></pre class="example">
<pre class="example">
{
hasbattery: true,
cyclecount: 35,
ischarging: false,
designedcapacity: 64958,
maxcapacity: 65865,
currentcapacity: 64856,
voltage: 12.767,
capacityUnit: 'mWh',
percent: 100,
timeremaining: 551,
acconnected: false,
type: 'Li-ion',
model: '',
manufacturer: 'Apple',
serial: 'F9Y19860Y9AH9XBAX'
}
</pre>
</tr>
</tbody>
</table>
<h2>Known issues</h2>
+5
View File
@@ -83,6 +83,11 @@
</tr>
</thead>
<tbody>
<tr>
<th scope="row">4.20.1</th>
<td>2020-01-26</td>
<td><span class="code">battery()</span> code refactoring, cleanup, updated docs</td>
</tr>
<tr>
<th scope="row">4.20.0</th>
<td>2020-01-25</td>
+2 -2
View File
@@ -168,7 +168,7 @@
<img class="logo" src="assets/logo.png">
<div class="title">systeminformation</div>
<div class="subtitle"><span id="typed"></span></div>
<div class="version">Current Version: <span id="version">4.20.0</span></div>
<div class="version">Current Version: <span id="version">4.20.1</span></div>
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
</div>
<div class="down">
@@ -206,7 +206,7 @@
<div class="title">Downloads last month</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-12">
<div class="numbers">239</div>
<div class="numbers">240</div>
<div class="title">Dependends</div>
</div>
</div>
+4
View File
@@ -586,6 +586,10 @@ pre {
text-align: left;
}
.example {
background-color: unset;
}
footer {
background-color: #eee;
margin-top: 30px;
+1 -1
View File
File diff suppressed because one or more lines are too long
+3
View File
@@ -406,6 +406,9 @@ pre {
width: 100%;
text-align: left;
}
.example {
background-color: unset;
}
footer {
background-color: #eee;
margin-top: 30px;