script-case
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Script Case Travis CI Build Status

Make text superscript or subscript.

NPM Badge

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.

Package Sidebar

Install

npm i script-case

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

5.14 kB

Total Files

8

Last publish

Collaborators

  • richienb