npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

3ds-smdh

v1.0.1

Published

Reads and writes Nintendo 3DS SMDH files

Downloads

5

Readme

3ds-smdh

Reads and writes Nintendo 3DS SMDH files

API Reference

Classes

Typedefs

SMDH

Kind: global class

new SMDH([buffer])

A class for reading and writing 3DS SMDH data.

| Param | Type | Description | | --- | --- | --- | | [buffer] | Buffer | An existing SMDH buffer to load |

smdH.writeTitleBuffer(buffer, index) ⇒ SMDH

Writes the title buffer to the SMDH buffer at the specified index

Kind: instance method of SMDH
Returns: SMDH - The current class

| Param | Type | Description | | --- | --- | --- | | buffer | TitleBuffer | The buffer to write | | index | Integer | The index to write to |

smdH.getTitle(index) ⇒ TitleObject

Gets the title object from the SMDH at the specified index

Kind: instance method of SMDH

| Param | Type | Description | | --- | --- | --- | | index | Integer | The title index to read |

smdH.getJapaneseTitle() ⇒ TitleObject

Gets the Japanese title object

Kind: instance method of SMDH

smdH.getEnglishTitle() ⇒ TitleObject

Gets the English title object

Kind: instance method of SMDH

smdH.getFrenchTitle() ⇒ TitleObject

Gets the French title object

Kind: instance method of SMDH

smdH.getGermanTitle() ⇒ TitleObject

Gets the German title object

Kind: instance method of SMDH

smdH.getItalianTitle() ⇒ TitleObject

Gets the Italian title object

Kind: instance method of SMDH

smdH.getSpanishTitle() ⇒ TitleObject

Gets the Spanish title object

Kind: instance method of SMDH

smdH.getSimplifiedChineseTitle() ⇒ TitleObject

Gets the Simplified Chinese title object

Kind: instance method of SMDH

smdH.getKoreanTitle() ⇒ TitleObject

Gets the Korean title object

Kind: instance method of SMDH

smdH.getDutchTitle() ⇒ TitleObject

Gets the Dutch title object

Kind: instance method of SMDH

smdH.getPortugueseTitle() ⇒ TitleObject

Gets the Portuguese title object

Kind: instance method of SMDH

smdH.getRussianTitle() ⇒ TitleObject

Gets the Russian title object

Kind: instance method of SMDH

smdH.getTraditionalChineseTitle() ⇒ TitleObject

Gets the Traditional Chinese title object

Kind: instance method of SMDH

smdH.getAllTitles() ⇒ TitleObjects

Gets object with the all title objects

Kind: instance method of SMDH

smdH.setTitle(index, shortDescription, longDescription, publisher) ⇒ SMDH

Sets the title in the SMDH for the specified index

Kind: instance method of SMDH
Returns: SMDH - The current class

| Param | Type | Description | | --- | --- | --- | | index | Integer | The title index to write to | | shortDescription | String | The short description, max of 64 characters | | longDescription | String | The long description, max of 128 characters | | publisher | String | The publisher, max of 64 characters |

smdH.setJapaneseTitle(shortDescription, longDescription, publisher) ⇒ SMDH

Sets the Japanese title

Kind: instance method of SMDH
Returns: SMDH - The current class

| Param | Type | Description | | --- | --- | --- | | shortDescription | String | The short description, max of 64 characters | | longDescription | String | The long description, max of 128 characters | | publisher | String | The publisher, max of 64 characters |

smdH.setEnglishTitle(shortDescription, longDescription, publisher) ⇒ SMDH

Sets the English title

Kind: instance method of SMDH
Returns: SMDH - The current class

| Param | Type | Description | | --- | --- | --- | | shortDescription | String | The short description, max of 64 characters | | longDescription | String | The long description, max of 128 characters | | publisher | String | The publisher, max of 64 characters |

smdH.setFrenchTitle(shortDescription, longDescription, publisher) ⇒ SMDH

Sets the French title

Kind: instance method of SMDH
Returns: SMDH - The current class

| Param | Type | Description | | --- | --- | --- | | shortDescription | String | The short description, max of 64 characters | | longDescription | String | The long description, max of 128 characters | | publisher | String | The publisher, max of 64 characters |

smdH.setGermanTitle(shortDescription, longDescription, publisher) ⇒ SMDH

Sets the German title

Kind: instance method of SMDH
Returns: SMDH - The current class

| Param | Type | Description | | --- | --- | --- | | shortDescription | String | The short description, max of 64 characters | | longDescription | String | The long description, max of 128 characters | | publisher | String | The publisher, max of 64 characters |

smdH.setItalianTitle(shortDescription, longDescription, publisher) ⇒ SMDH

Sets the Italian title

Kind: instance method of SMDH
Returns: SMDH - The current class

| Param | Type | Description | | --- | --- | --- | | shortDescription | String | The short description, max of 64 characters | | longDescription | String | The long description, max of 128 characters | | publisher | String | The publisher, max of 64 characters |

smdH.setSpanishTitle(shortDescription, longDescription, publisher) ⇒ SMDH

Sets the Spanish title

Kind: instance method of SMDH
Returns: SMDH - The current class

| Param | Type | Description | | --- | --- | --- | | shortDescription | String | The short description, max of 64 characters | | longDescription | String | The long description, max of 128 characters | | publisher | String | The publisher, max of 64 characters |

smdH.setSimplifiedChineseTitle(shortDescription, longDescription, publisher) ⇒ SMDH

Sets the Simplified Chinese title

Kind: instance method of SMDH
Returns: SMDH - The current class

| Param | Type | Description | | --- | --- | --- | | shortDescription | String | The short description, max of 64 characters | | longDescription | String | The long description, max of 128 characters | | publisher | String | The publisher, max of 64 characters |

smdH.setKoreanTitle(shortDescription, longDescription, publisher) ⇒ SMDH

Sets the Korean title

Kind: instance method of SMDH
Returns: SMDH - The current class

| Param | Type | Description | | --- | --- | --- | | shortDescription | String | The short description, max of 64 characters | | longDescription | String | The long description, max of 128 characters | | publisher | String | The publisher, max of 64 characters |

smdH.setDutchTitle(shortDescription, longDescription, publisher) ⇒ SMDH

Sets the Dutch title

Kind: instance method of SMDH
Returns: SMDH - The current class

| Param | Type | Description | | --- | --- | --- | | shortDescription | String | The short description, max of 64 characters | | longDescription | String | The long description, max of 128 characters | | publisher | String | The publisher, max of 64 characters |

smdH.setPortugueseTitle(shortDescription, longDescription, publisher) ⇒ SMDH

Sets the Portuguese title

Kind: instance method of SMDH
Returns: SMDH - The current class

| Param | Type | Description | | --- | --- | --- | | shortDescription | String | The short description, max of 64 characters | | longDescription | String | The long description, max of 128 characters | | publisher | String | The publisher, max of 64 characters |

smdH.setRussianTitle(shortDescription, longDescription, publisher) ⇒ SMDH

Sets the Russian title

Kind: instance method of SMDH
Returns: SMDH - The current class

| Param | Type | Description | | --- | --- | --- | | shortDescription | String | The short description, max of 64 characters | | longDescription | String | The long description, max of 128 characters | | publisher | String | The publisher, max of 64 characters |

smdH.setTraditionalChineseTitle(shortDescription, longDescription, publisher) ⇒ SMDH

Sets the Traditional Chinese title

Kind: instance method of SMDH
Returns: SMDH - The current class

| Param | Type | Description | | --- | --- | --- | | shortDescription | String | The short description, max of 64 characters | | longDescription | String | The long description, max of 128 characters | | publisher | String | The publisher, max of 64 characters |

smdH.setAllTitles(shortDescription, longDescription, publisher) ⇒ SMDH

Sets all of the titles

Kind: instance method of SMDH
Returns: SMDH - The current class

| Param | Type | Description | | --- | --- | --- | | shortDescription | String | The short description, max of 64 characters | | longDescription | String | The long description, max of 128 characters | | publisher | String | The publisher, max of 64 characters |

smdH.getSmallIcon([callback]) ⇒ Promise.<PNG>

Get the small icon image as a pngjs PNG object

Kind: instance method of SMDH
Returns: Promise.<PNG> - A promise with a pngjs PNG object

| Param | Type | Description | | --- | --- | --- | | [callback] | function | An optional node.js style callback |

smdH.getLargeIcon([callback]) ⇒ Promise.<PNG>

Get the small icon image as a pngjs PNG object

Kind: instance method of SMDH
Returns: Promise.<PNG> - A promise with a pngjs PNG object

| Param | Type | Description | | --- | --- | --- | | [callback] | function | An optional node.js style callback |

smdH.setIcon(bitmap, iconSize, [callback]) ⇒ Promise.<Buffer>

Sets the icon specified with iconSize

Kind: instance method of SMDH
Returns: Promise.<Buffer> - The current SMDH buffer

| Param | Type | Description | | --- | --- | --- | | bitmap | BitmapObject | A pngjs PNG-like object with RGBA bitmap data, width, and height. Must be either 24x24 or 48x48. | | iconSize | Integer | The destination icon size, 24 sets the small icon, and 48 sets the large icon | | [callback] | function | An optional node.js style callback |

smdH.setIcons(bitmap, [callback]) ⇒ Promise.<buffer>

Sets both the small and large icons

Kind: instance method of SMDH
Returns: Promise.<buffer> - The current SMDH data buffer

| Param | Type | Description | | --- | --- | --- | | bitmap | BitmapObject | A square bitmap object | | [callback] | function | An optional node.js style callback |

smdH.getBuffer() ⇒ Buffer

Gets the current SMDH buffer

Kind: instance method of SMDH
Returns: Buffer - The SMDH data buffer

TitleObject : Object

Kind: global typedef
Properties

| Name | Type | Description | | --- | --- | --- | | shortDescription | String | The short description | | longDescription | String | The long description | | publisher | String | The publisher |

TitleBuffer : Buffer

A Buffer object that is exactly 0x200 bytes long

Kind: global typedef

TitleObjects : Object.<TitleObject>

Kind: global typedef
Properties

| Name | Type | Description | | --- | --- | --- | | japanese | TitleObject | The Japanese title object | | english | TitleObject | The English title object | | french | TitleObject | The French title object | | german | TitleObject | The German title object | | italian | TitleObject | The Italian title object | | spanish | TitleObject | The Spanish title object | | simplifiedChinese | TitleObject | The Simplified Chinese title object | | korean | TitleObject | The Korean title object | | dutch | TitleObject | The Dutch title object | | portuguese | TitleObject | The Portuguese title object | | russian | TitleObject | The Russian title object | | traditionalChinese | TitleObject | The Traditional Chinese title object |

BitmapObject : Object

Kind: global typedef
Properties

| Name | Type | Description | | --- | --- | --- | | data | Buffer | Raw RGBA bitmap data buffer | | width | Integer | Image width | | height | Integer | Image height |