getAllData() added wifiNetworks
This commit is contained in:
parent
1fd784f219
commit
5f2beb701b
11
lib/index.js
Normal file → Executable file
11
lib/index.js
Normal file → Executable file
@ -140,8 +140,8 @@ function getDynamicData(srv, iface, callback) {
|
||||
|
||||
// use closure to track ƒ completion
|
||||
let functionProcessed = (function () {
|
||||
let totalFunctions = 14;
|
||||
if (_windows) totalFunctions = 10;
|
||||
let totalFunctions = 15;
|
||||
if (_windows) totalFunctions = 11;
|
||||
if (_freebsd || _openbsd || _netbsd) totalFunctions = 11;
|
||||
if (_sunos) totalFunctions = 6;
|
||||
|
||||
@ -260,6 +260,13 @@ function getDynamicData(srv, iface, callback) {
|
||||
});
|
||||
}
|
||||
|
||||
if (!_openbsd && !_freebsd && !_netbsd && !_sunos) {
|
||||
wifi.wifiNetworks().then(res => {
|
||||
data.wifiNetworks = res;
|
||||
functionProcessed();
|
||||
});
|
||||
}
|
||||
|
||||
internet.inetLatency().then(res => {
|
||||
data.inetLatency = res;
|
||||
functionProcessed();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user