# sb-glyph

> Get glyph from item_bytes

Latest version **1.0.2** (published 2020-07-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install sb-glyph
pnpm add sb-glyph
yarn add sb-glyph
bun add sb-glyph
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-07-12 |
| First published | 2020-07-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 20 MB |
| Known vulnerabilities | 0 (+4 in 1 direct dependencies) |
| Install scripts | no |
| Author | Daniel Wykerd |
| Maintainers | wykerd |
| Keywords | Skyblock, Hypixel |

## Links

- npm: https://www.npmjs.com/package/sb-glyph
- npm.io page: https://npm.io/package/sb-glyph

## Dependencies (10)

- [nbt](https://npm.io/package/nbt.md) ^0.8.1
- [sharp](https://npm.io/package/sharp.md) ^0.25.4
- [canvas](https://npm.io/package/canvas.md) ^2.6.1
- [upng-js](https://npm.io/package/upng-js.md) ^2.1.0
- [micromatch](https://npm.io/package/micromatch.md) ^4.0.2
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.0
- [relaxed-json](https://npm.io/package/relaxed-json.md) ^1.0.3
- [minecraft-data](https://npm.io/package/minecraft-data.md) ^2.62.1
- [prismarine-nbt](https://npm.io/package/prismarine-nbt.md) ^1.3.0
- [lodash.escaperegexp](https://npm.io/package/lodash.escaperegexp.md) ^4.1.2

## Recent versions

- 1.0.2 (latest) — 2020-07-12
- 1.0.1 — 2020-07-12
- 1.0.0 — 2020-07-10

## README

# Skyblock Glyphs

Get item glyphs from item_bytes returned by the hypixel api. 

# Installation
```bash
yarn add sb-glyph # or using npm i sb-glyph
```

# Usage

Simple usage:

```js
const { getGlyph, getItems } = require('sb-glyph');

const fs = require('fs');

(async () => {
    // getItems returns an array of the decoded items
    const items = await getItems(item_bytes /* This is the base64 encoded buffer returned by the hypixel api*/, true);

    console.log(items);
    
    // getGlyph returns the glyph of the item as a buffer containing the image encoded as png. If no glyph is found, returns undefined
    const buf = await getGlyph(ret[0] /* path_to_head_cache: has default */)
})();
```

If I went lazy I would've documented with JSDoc :-)

# Credits

This module uses code from: 

## [Skyblock-stats](https://github.com/LeaPhant/skyblock-stats)

Used their code to determine glyph from item_bytes

Additional credits to the creators of the texture packs used by skyblock-stats and this module:

- **Animated Custom Weapons and Armors**: [FurfSky+](https://hypixel.net/threads/2138599/) by Furf__
- **Additional Custom Textures**: [Vanilla+](https://hypixel.net/threads/2147652/) by TBlazeWarriorT
- **Default Textures**: [Minecraft](https://www.minecraft.net/) by Mojang
- **Player Heads**: [SkyBlock](https://hypixel.net/forums/skyblock.157/) by Hypixel.

## [Crafatar](https://github.com/crafatar/crafatar)

Used render the player heads

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