<commit_before>/*
Adding new router config.
routerConfig:{
    router:type Object
    publishMethod:type String,
    useDefaultRouter:type Boolean
}*/
var exec = require('cordova/exec'), cordova = require('cordova'),
channel = require('cordova/channel'),
    utils = require('cordova/utils');
    var url,uname,pass,iscls,router = null;
    var isDefault = true;
    
    exports.connect = function(args){
        //SSL support is coming soon
        //var urgx = /(^(tcp|ssl|local)&?:\/\/[^\s]+\:[^\s]{2,})/g;
        var urgx = /(^(tcp|local)&?:\/\/[^\s]+\:[^\s]{2,})/g;
        if (args.port!==undefined) {
            url = args.url+":"+args.port;
        } else{
            url = args.url;
        };
        if (args.willTopicConfig!==undefined) {
            if(args.willTopicConfig.retain===undefined){
                args.willTopicConfig.retain = true;
            }
        } else {
            args.willTopicConfig = new Object();
        }
        if (args.isCleanSession===undefined) {
            iscls = true;
        } else {
            iscls = args.isCleanSession;
        }
        if (args.routerConfig!==undefined) {
            if(Object.keys(args.routerConfig).length>0){
                if (!args.routerConfig.useDefaultRouter&&args.routerConfig.useDefaultRouter!==undefined) {<commit_msg>Better url regex<commit_after>/*
Adding new router config.
routerConfig:{
    router:type Object
    publishMethod:type String,
    useDefaultRouter:type Boolean
}*/
var exec = require('cordova/exec'), cordova = require('cordova'),
channel = require('cordova/channel'),
    utils = require('cordova/utils');
    var url,uname,pass,iscls,router = null;
    var isDefault = true;
    
    exports.connect = function(args){
        //SSL support is coming soon
        //var urgx = //(^(tcp|ssl|local)&?:\/\/[^\@_?!]+[^\s]+[^\.]+\:\d{2,})/g;
        var urgx = /(^(tcp|local)&?:\/\/[^\@_?!]+[^\s]+[^\.]+\:\d{2,})/g;
        if (args.port!==undefined) {
            url = args.url+":"+args.port;
        } else{
            url = args.url;
        };
        if (args.willTopicConfig!==undefined) {
            if(args.willTopicConfig.retain===undefined){
                args.willTopicConfig.retain = true;
            }
        } else {
            args.willTopicConfig = new Object();
        }
        if (args.isCleanSession===undefined) {
            iscls = true;
        } else {
            iscls = args.isCleanSession;
        }
        if (args.routerConfig!==undefined) {
            if(Object.keys(args.routerConfig).length>0){
                if (!args.routerConfig.useDefaultRouter&&args.routerConfig.useDefaultRouter!==undefined) {
{'fraction_non_alphanumeric': 0.17193378480060195, 'fraction_numerical': 0.002257336343115124, 'mean_word_length': 2.1959134615384617, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2237311', 'n_tokens_mistral': 826, 'n_tokens_neox': 808, 'n_words': 138}