src/cook-template-string.js
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;
}
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;
}
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 ; }
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
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