Limit list to 20 wifi APs, not 5.

This commit is contained in:
mmcwilliams 2019-03-26 16:08:16 -04:00
parent 52ace62fc6
commit 3a4c076d82
1 changed files with 2 additions and 1 deletions

View File

@ -33,13 +33,14 @@ class Wifi {
console.error(err)
return callback(err)
}
const limit = 20;
const lines = stdout.split('\n')
let output = []
let line
let i = 0
for (let l of lines) {
line = l.replace('ESSID:', '').trim()
if (line !== '""' && i < 5) {
if (line !== '""' && i < limit) {
line = line.replace(quoteRe, '')
output.push(line)
}