From 3a4c076d822ecb90933674a51e91f8a964f9cbee Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Tue, 26 Mar 2019 16:08:16 -0400 Subject: [PATCH] Limit list to 20 wifi APs, not 5. --- lib/wifi/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/wifi/index.js b/lib/wifi/index.js index 193f4d7..14abcdd 100644 --- a/lib/wifi/index.js +++ b/lib/wifi/index.js @@ -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) }