# mojangjs

> A simple package to get the UUID of a username

Latest version **2.0.3** (published 2018-12-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install mojangjs
pnpm add mojangjs
yarn add mojangjs
bun add mojangjs
```

## 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 | 2.0.3 |
| Published | 2018-12-03 |
| First published | 2018-10-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Christopher Nethercott |
| Maintainers | thorin |
| Keywords | minecraft, uuid, conversion |

## Links

- npm: https://www.npmjs.com/package/mojangjs
- Repository: https://github.com/chriscn/mcuuid
- Homepage: https://github.com/chriscn/mcuuid#readme
- Issues: https://github.com/chriscn/mcuuid/issues
- npm.io page: https://npm.io/package/mojangjs

## Dependencies (2)

- [request](https://npm.io/package/request.md) ^2.88.0
- [request-promise](https://npm.io/package/request-promise.md) ^4.2.2

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 2.0.3 (latest) — 2018-12-03
- 2.0.2 — 2018-12-03
- 2.0.1 — 2018-12-03
- 2.0.0 — 2018-11-16
- 1.1.1 — 2018-10-27
- 1.1.0 — 2018-10-23
- 1.0.3 — 2018-10-17
- 1.0.2 — 2018-10-17

## README

# mojangjs
A lightweight, simple way to get UUIDs of usernames.
## Usage
Of course after running `npm install mojangjs` the methods are simple.  
All methods use Promise style callbacks as they are preferred.
## Methods
#### `getUUID(uuid)` - Gets the UUID of the player.
```js  
mojangjs.getUUID('Thorin').then(uuid => {
    console.log(uuid);
}).catch(err => console.error(err));
```
#### `nameHistory.byName(playername)` - Gets the name history of a player.
```js
mojangjs.nameHistory.byName('Thorin').then(nameHistory => {
	console.log(nameHistory);
}).catch(err => console.error(err));
```
#### `nameHistory.byUUID(uuid)` - Gets the name history of a UUID.
```js
mojangjs.nameHistory.byUUID('5de3d1d51a954fb3a2b788e4938ae11c').then(nameHistory => {
	console.log(nameHistory);
}).catch(err => console.error(err));
```
#### `statusCheck()` - Gets the current status from Mojang.
```js
mojangjs.statusCheck().then(status => {
	console.log(status);
}).catch(err => console.error(err));
```
#### `getNameFromUUID(uuid)` - Gets the current playername from a UUID.
```js
mojangjs.getNameFromUUID(uuid).then(name => {
	console.log(name);
}).catch(err => console.error(err));
```

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