1.1.3 • Published 5 years ago

@extra-string/to-superscript v1.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

Convert string to superscript characters, limited support.

Only following characters can be superscripted:

  • () + - 0123456789 =
  • AB DE GHIJKLMNOP R TU W
  • abcdefghijklmnop rstuvwxyz
const toSuperscript = require('@extra-string/to-superscript');
// toSuperscript(<string>)

toSuperscript('hello world');
// 'ʰᵉˡˡᵒ ʷᵒʳˡᵈ'
toSuperscript('DECCAN PLATEAU');
// 'ᴰᴱCCᴬᴺ ᴾᴸᴬᵀᴱᴬᵁ'
'6.626 x 10'+toSuperscript('-34');
// '6.626 x 10⁻³⁴' (Planck's constant)

extra-string