code: function getCodePoints(str) {
    const codePoints = [];
    for (let pos = 0; pos < str.length; pos += getUTF16Length(str, pos)) {
      codePoints.push(str.codePointAt(pos));
    }
    return codePoints;
  }
docs: Get a list of Unicode code-points from a String
  
  @param {string} str        Valid Unicode string
  @return {array<number>}    A list of code-points in [0..0x10FFFF]