code: function(codePoints) {
  		var index = -1;
  		var length = codePoints.length;
  		var max = length - 1;
  		var result = [];
  		var isStart = true;
  		var tmp;
  		var previous = 0;
  		while (++index < length) {
  			tmp = codePoints[index];
  			if (isStart) {
  				result.push(tmp);
  				previous = tmp;
  				isStart = false;
  			} else {
  				if (tmp == previous + 1) {
  					if (index != max) {
  						previous = tmp;
  						continue;
  					} else {
  						isStart = true;
  						result.push(tmp + 1);
  					}
  				} else {
  					// End the previous range and start a new one.
  					result.push(previous + 1, tmp);
  					previous = tmp;
  				}
  			}
  		}
  		if (!isStart) {
  			result.push(tmp + 1);
  		}
  		return result;
  	}
docs: /*--------------------------------------------------------------------------