nl_tokens: Parses the results of a scan_result request .
pl_tokens: function parse_scan_results ( block ) { var <mask> ; var results = [ ] ; var lines ; lines = block . split ( '\n' ) . map ( function ( item ) { return item + "\n" ; } ) ; lines . forEach ( function ( entry ) { var parsed = { } ; if ( ( match = entry . match ( / ([A-Fa-f0-9:]{17})\t / ) ) ) { parsed . bssid = match [ 1 ] . toLowerCase ( ) ; } if ( ( match = entry . match ( / \t([\d]+)\t+ / ) ) ) { parsed . frequency = parseInt ( match [ 1 ] , 10 ) ; } if ( ( match = entry . match ( / ([-][0-9]+)\t / ) ) ) { parsed . signalLevel = parseInt ( match [ 1 ] , 10 ) ; } if ( ( match = entry . match ( / \t(\[.+\])\t / ) ) ) { parsed . flags = match [ 1 ] ; } if ( ( match = entry . match ( / \t([^\t]{1,32}(?=\n)) / ) ) ) { parsed . ssid = match [ 1 ] ; } if ( ! ( Object . keys ( parsed ) . length === 0 && parsed . constructor === Object ) ) { results . push ( parsed ) ; } } ) ; return results ; }