Limit list to 20 wifi APs, not 5.
This commit is contained in:
parent
52ace62fc6
commit
3a4c076d82
|
@ -33,13 +33,14 @@ class Wifi {
|
||||||
console.error(err)
|
console.error(err)
|
||||||
return callback(err)
|
return callback(err)
|
||||||
}
|
}
|
||||||
|
const limit = 20;
|
||||||
const lines = stdout.split('\n')
|
const lines = stdout.split('\n')
|
||||||
let output = []
|
let output = []
|
||||||
let line
|
let line
|
||||||
let i = 0
|
let i = 0
|
||||||
for (let l of lines) {
|
for (let l of lines) {
|
||||||
line = l.replace('ESSID:', '').trim()
|
line = l.replace('ESSID:', '').trim()
|
||||||
if (line !== '""' && i < 5) {
|
if (line !== '""' && i < limit) {
|
||||||
line = line.replace(quoteRe, '')
|
line = line.replace(quoteRe, '')
|
||||||
output.push(line)
|
output.push(line)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue