script-case
v1.0.1
Published
Make text superscript or subscript.
Downloads
6
Maintainers
Readme
Script Case
Make text superscript or subscript.
Install
npm install script-case
Usage
const scriptCase = require("script-case");
scriptCase.superscript("hello world");
//=> 'ʰᵉˡˡᵒ ʷᵒʳˡᵈ'
scriptCase.subscript("hello world")
//=> 'ₕₑₗₗₒ wₒᵣₗd'
You can also get the internal conversion dictionaries:
const superscript = require("script-case/superscript")
//=> { "0": "⁰", "1": "¹", ... }
const subscript = require("script-case/subscript")
//=> { "0": "₀", "1": "₁", ... }
API
scriptCase.superscript(input)
input
Type: string
The string to convert.
scriptCase.subscript(input)
input
Type: string
The string to convert.