index.d.ts 447 B

123456789101112
  1. /**
  2. * Decode a single character reference (without the `&` or `;`).
  3. * You probably only need this when you’re building parsers yourself that follow
  4. * different rules compared to HTML.
  5. * This is optimized to be tiny in browsers.
  6. *
  7. * @param {string} value
  8. * `notin` (named), `#123` (deci), `#x123` (hexa).
  9. * @returns {string|false}
  10. * Decoded reference.
  11. */
  12. export function decodeNamedCharacterReference(value: string): string | false