{"size": 587, "ext": "js", "max_stars_repo_path": "BlazarUI/app/scripts/utils/logHelpers.js", "max_stars_repo_name": "smtcrms/Blazar", "max_stars_repo_stars_event_min_datetime": "2015-08-03T17:36:33.000Z", "max_stars_repo_stars_event_max_datetime": "2019-10-26T11:49:36.000Z", "max_issues_repo_path": "BlazarUI/app/scripts/utils/logHelpers.js", "max_issues_repo_name": "smtcrms/Blazar", "max_issues_repo_issues_event_min_datetime": "2015-08-21T14:09:33.000Z", "max_issues_repo_issues_event_max_datetime": "2017-12-18T23:35:23.000Z", "max_forks_repo_path": "BlazarUI/app/scripts/utils/logHelpers.js", "max_forks_repo_name": "smtcrms/Blazar", "max_forks_repo_forks_event_min_datetime": "2015-08-31T17:22:33.000Z", "max_forks_repo_forks_event_max_datetime": "2017-07-22T09:58:22.000Z"}
{"max_stars_count": 71, "max_issues_count": 175, "max_forks_count": 9, "avg_line_length": 20.9642857143, "max_line_length": 46, "alphanum_fraction": 0.4599659284}
export const getByteLength = (normalVal) => {
  // Force string type
  normalVal = String(normalVal);

  let byteLen = 0;
  for (let i = 0; i < normalVal.length; i++) {
    const c = normalVal.charCodeAt(i);

    if (c < (1 << 7)) {
      byteLen += 1;
    } else if (c < (1 << 11)) {
      byteLen += 2;
    } else if (c < (1 << 16)) {
      byteLen += 3;
    } else if (c < (1 << 21)) {
      byteLen += 4;
    } else if (c < (1 << 26)) {
      byteLen += 5;
    } else if (c < (1 << 31)) {
      byteLen += 6;
    } else {
      byteLen += Number.NaN;
    }
  }

  return byteLen;
};
