index.js
async function listConnections() {
    const connList = await executeCommand(
        ['nmcli', '-f', 'NAME,DEVICE', '-t', 'connection', 'show']);
    const ret = {};
    connList.split('\n').map((l) => {
        return l.split(/:/);
    }).filter((ary) => {
        return ary[0] && ary[1];
    }).forEach((ary) => {
        ret[ary[0]] = ary[1];
    });
    return ret;
}
async function listConnections() {
    const connList = await executeCommand(
        ['nmcli', '-f', 'NAME,DEVICE', '-t', 'connection', 'show']);
    const ret = {};
    connList.split('\n').map((l) => {
        return l.split(/:/);
    }).filter((ary) => {
        return ary[0] && ary[1];
    }).forEach((ary) => {
        ret[ary[0]] = ary[1];
    });
    return ret;
}
async function listConnections ( ) { const connList = await executeCommand ( [ 'nmcli' , '-f' , 'NAME,DEVICE' , '-t' , 'connection' , 'show' ] ) ; const ret = { } ; connList . split ( '\n' ) . map ( ( l ) => { return l . split ( / : / ) ; } ) . filter ( ( ary ) => { return ary [ 0 ] && ary [ 1 ] ; } ) . forEach ( ( ary ) => { ret [ ary [ 0 ] ] = ary [ 1 ] ; } ) ; return ret ; }
List connection names with device name
@return {Array.<object>} Return list of connection name and device name
List connection names with device name