# superscript-number

> Converts a number to superscript format

Latest version **1.0.0** (published 2015-02-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install superscript-number
pnpm add superscript-number
yarn add superscript-number
bun add superscript-number
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-02-24 |
| First published | 2015-02-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Mikola Lysenko |
| Maintainers | mikolalysenko |
| Keywords | super, script, superscript, number, pretty, print, exponent |

## Links

- npm: https://www.npmjs.com/package/superscript-number
- Repository: https://github.com/mikolalysenko/superscript-number
- Issues: https://github.com/mikolalysenko/superscript-number/issues
- npm.io page: https://npm.io/package/superscript-number

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2015-02-24

## README

superscript-number
==================
Converts a number to a superscript unicode character.

# Example

```javascript
var super = require('superscript-number')

console.log(super(1052))
console.log(super(-66))
console.log(super(1e32))
console.log(super(Infinity))
console.log(super(NaN))
console.log(super(-Infinity))
```

Output:

```
¹⁰⁵²
⁻⁶⁶
¹ᵉ⁺³²
⁺ᴵⁿᶠ
ᴺᵃᴺ
⁻ᴵⁿᶠ
```

Not the prettiest kerning in the world, but it works :shrug:

# Install

```
npm i superscript-number
```

# API

#### `var str = require('superscript-number')(x[, base])`
Converts a number to a superscript string

* `x` is a number
* `base` is an integer between 2 and 36 represeting the base of the output

**Returns** a superscript string printing out `x`

# License
(c) 2015 Mikola Lysenko. MIT License.

---
_Source: https://npm.io/package/superscript-number · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
