code: function ord(str) {
      var code = str.charCodeAt(0);
  
      // High surrogate.
      if (0xD800 <= code && code <= 0xDBFF) {
          // This is just a high surrogate with no following low surrogate, so we return its value;
          if (str.length === 1) {
              return code;
          }
  
          var low = str.charCodeAt(1);
  
          return ((code - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000;
      }
  
      // Low surrogate
      if (0xDC00 <= code && code <= 0xDFFF) {
          return code;
      }
  
      return code;
  }
docs: A helper method that turns a character into an integer (i.e. the code-point value of a char).
  
  @param {String}
  @return {Number}