@extra-string/to-superscript

1.1.3 • Public • Published

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

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @extra-string/to-superscript

      Weekly Downloads

      9

      Version

      1.1.3

      License

      MIT

      Unpacked Size

      2.94 kB

      Total Files

      4

      Last publish

      Collaborators

      • npm