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 🙏

© 2026 – Pkg Stats / Ryan Hefner

figlet-go

v0.0.1

Published

FIGlet ASCII art text generator - WebAssembly module compiled from Go

Downloads

85

Readme

figlet-go

FIGlet ASCII art text generator - WebAssembly module compiled from Go

npm version License: BSD-3-Clause

Generate beautiful ASCII art text from your JavaScript/Node.js applications using the power of WebAssembly.

Installation

npm install figlet-go

Quick Start

const figlet = require('figlet-go');

// Simple rendering
const art = await figlet.render('Hello!');
console.log(art);

// Output:
//  _   _      _ _       _ 
// | | | | ___| | | ___ | |
// | |_| |/ _ \ | |/ _ \| |
// |  _  |  __/ | | (_) |_|
// |_| |_|\___|_|_|\___/(_)

API Reference

render(text: string): Promise<string>

Render text using the default font (standard).

const art = await figlet.render('Hello');

renderWithFont(text: string, font: string): Promise<string>

Render text with a specific font.

const art = await figlet.renderWithFont('Hello', 'slant');

listFonts(): Promise<string[]>

Get a list of all available fonts.

const fonts = await figlet.listFonts();
console.log(fonts); // ['banner', 'big', 'block', ...]

getVersion(): Promise<string>

Get the FIGlet version.

const version = await figlet.getVersion();
console.log(version); // '2.2.5'

createInstance(options?): Promise<FigletInstance>

Create a configured FIGlet instance for more control.

const fig = await figlet.createInstance({
    font: 'slant',
    width: 100,
    justification: 'center'
});

const result = fig.render('Hello');
console.log(result.result);

Options

| Option | Type | Description | |--------|------|-------------| | font | string | Font name to use | | width | number | Output width (default: 80) | | justification | 'left' \| 'center' \| 'right' \| 'auto' | Text alignment |

Available Fonts

The package includes 146 built-in fonts from the FIGlet font database:

Popular fonts: standard, banner, big, block, slant, shadow, script, small, doom, graffiti, starwars, larry3d, colossal, gothic, epic, poison, roman, rounded, speed, stellar, and many more!

Use listFonts() to see all available fonts.

Browser Usage

<script src="https://unpkg.com/figlet-go/dist/wasm_exec.js"></script>
<script type="module">
import figlet from 'https://unpkg.com/figlet-go/dist/index.mjs';

// Initialize with WASM path
await figlet.init('https://unpkg.com/figlet-go/dist/figlet.wasm');

const art = await figlet.render('Hello Web!');
console.log(art);
</script>

TypeScript Support

Full TypeScript definitions are included:

import figlet, { FigletInstance } from 'figlet-go';

const art: string = await figlet.render('Hello');
const fonts: string[] = await figlet.listFonts();

const instance: FigletInstance = await figlet.createInstance({
    font: 'slant',
    justification: 'center'
});

Examples

Generate multiple styles

const figlet = require('figlet-go');

const fonts = ['standard', 'slant', 'banner', 'big'];

for (const font of fonts) {
    console.log(`\n--- ${font} ---\n`);
    const art = await figlet.renderWithFont('Hello', font);
    console.log(art);
}

Custom width and alignment

const fig = await figlet.createInstance({
    font: 'small',
    width: 60,
    justification: 'center'
});

const result = fig.render('Centered');
console.log(result.result);

Performance

This package uses WebAssembly compiled from Go, providing:

  • Fast rendering: Native-speed text generation
  • 146 fonts: All fonts from figlet.org embedded
  • Consistent output: Same results across all platforms

Links

License

BSD-3-Clause © Leandro Ferreira

Based on FIGlet by Glenn Chappell, Ian Chai, John Cowan, Christiaan Keet, and Claudio Matsuoka.