<commit_before>var Redis = require('redis');
var crc16 = require('./lib/crc16.js');
var parseSlots = require('./lib/slot_parser.js');
var to_array = require("./lib/to_array");


/*
  @params: redisServers -> json format servers config [{port:xx[,host:xx[,slots:"1,2,3~100,101,105-200,xx"]]},{port:xxx}]
*/
function createClient(redisServers) {
  if (!redisServers) {
    throw new Error('need init configs');
    return null;
  }
  Array.isArray(redisServers) || (redisServers = [redisServers]);
  var clientsMap = {};
  var slotsPool = new Array(16384); //0->16383<commit_msg>add more compatible setting<commit_after>var Redis = require('redis');
var crc16 = require('./lib/crc16.js');
var parseSlots = require('./lib/slot_parser.js');
var to_array = require("./lib/to_array");


/*
  @params: redisServers -> json format servers config [{port:xx[,host:xx[,slots:"1,2,3~100,101,105-200,xx"]]},{port:xxx}]
*/
function createClient(redisServers) {
  if (!redisServers) {
    throw new Error('need init configs');
    return null;
  }
  if(arguments.length == 2){
    /*simple compatible for redis.CreateClient(port,host)*/
    redisServers = [{port:arguments[0],host:arguments[1]}];
  }
  
  Array.isArray(redisServers) || (redisServers = [redisServers]);
  var clientsMap = {};
  var slotsPool = new Array(16384); //0->16383
{'fraction_non_alphanumeric': 0.18580060422960726, 'fraction_numerical': 0.04758308157099698, 'mean_word_length': 4.915178571428571, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '1098802', 'n_tokens_mistral': 506, 'n_tokens_neox': 468, 'n_words': 90}