code: function getHexValue(rune) {
    if ("0" <= rune && rune <= "9") {
      return rune.charCodeAt(0) - 48;
    }
    if ("a" <= rune && rune <= "f") {
      return rune.charCodeAt(0) - 87;
    }
    if ("A" <= rune && rune <= "F") {
      return rune.charCodeAt(0) - 55;
    }
    return -1;
  }
docs: Exports a single function which "cooks" template strings, i.e. interprets any escape sequences and converts \r\n into \n. Adapted from shift-parser's scanStringEscape