code: function toIdentifier(string) {
    var result = '';
    var wasSep = false;
    for (var i = 0; i < string.length; i++) {
      var c = string.charAt(i);
      if (/[a-zA-Z0-9]/.test(c)) {
        if (wasSep) {
          c = c.toUpperCase();
          wasSep = false;
        }
        result += c;
      } else {
        wasSep = true;
      }
    }
    return result;
  }
docs: Transforms the given string into a valid identifier