{"size": 569, "ext": "js", "max_stars_repo_path": "08-browser-commonjs/applyColors.js", "max_stars_repo_name": "lupomontero/js-modules", "max_stars_repo_stars_event_min_datetime": "2021-06-30T16:04:03.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-18T15:01:32.000Z", "max_issues_repo_path": "08-browser-commonjs/applyColors.js", "max_issues_repo_name": "lupomontero/js-modules", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "08-browser-commonjs/applyColors.js", "max_forks_repo_name": "lupomontero/js-modules", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 3, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.8636363636, "max_line_length": 71, "alphanum_fraction": 0.546572935}
(function (root, factory) {
  if (typeof define === 'function' && define.amd) {
    // AMD. Register as an anonymous module.
    define([], factory);
  } else {
    // Browser globals
    root.applyColors = factory();
  }
}(typeof self !== 'undefined' ? self : this, function () {
  return function applyColors(el, colors) {
    var str = '';

    for (var i = 0; i < el.textContent.length; i += 1) {
      str += '<span style="color: ' + colors[i % colors.length] + '">';
      str += el.textContent[i];
      str += '<span>';
    }

    el.innerHTML = str;
  };
}));
