
module.exports = (function(){

    function parseCommandOption( args ){

        var options = {}, token;

        while( token = args.shift() ){

            if( !token.startsWith("--") ){
                 options.extra = [token].concat(args);
                 break;
            }

            let optionType = token.replace(/^--/, "");
            let i, len;

            for( i = 0, len = args.length; i < len; ++i ){
                if( args[i].startsWith("--"))
                    break;
            }

            options[optionType] = args.splice(0, i);
        }

        return options;
    }

    var handlers = {};

    handlers.echo = ( ...args )=>{
        return {
            msg: args.join(" ")  
        };
    }

    return handlers;
})();


module.exports = (function(){

    function parseCommandOption( args ){

        var options = {}, token;

        while( token = args.shift() ){

            if( !token.startsWith("--") ){
                 options.extra = [token].concat(args);
                 break;
            }

            let optionType = token.replace(/^--/, "");
            let i, len;

            for( i = 0, len = args.length; i < len; ++i ){
                if( args[i].startsWith("--"))
                    break;
            }

            options[optionType] = args.splice(0, i);
        }

        return options;
    }

    var handlers = {};

    handlers.echo = ( args )=>{

        var options = {
            msg: args.join(" ")  
        }

        return [ "echo", options ];
        };
    }

    return handlers;
})();

Fix bug and update the return value ( port ).
 Fix bug and update the return value ( port ).

 Changes to be committed:
    modified:   src/lib/edge/telegram/commandHandler.js
