ConstSUPERSCRIPT_GLYPHS["2"] // Returns "²"
const squared = "x" + SUPERSCRIPT_GLYPHS["2"] // Returns "x²"
export const SUPERSCRIPT_GLYPHS: { [key: string]: string } = {
/* tslint:disable */
'0': '⁰',
'1': '¹',
'2': '²',
'3': '³',
'4': '⁴',
'5': '⁵',
'6': '⁶',
'7': '⁷',
'8': '⁸',
'9': '⁹',
/* tslint:enable */
} as const;
A mapping of ASCII digits to their Unicode superscript glyphs, written as the literal characters (
⁰–⁹) rather than the\uXXXXescapes used by SUPERSCRIPTS. The mapped values are identical toSUPERSCRIPTSfor the digit keys — this is purely the literal-glyph spelling, handy where a source regex needs the visible characters.