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 🙏

© 2025 – Pkg Stats / Ryan Hefner

fancyhelloworld-demo

v1.0.0

Published

A fun JavaScript library that prints Hello World in ASCII art using 1s and 0s with customizable characters

Downloads

106

Readme

Fancy Hello World

This library was created for demo purposes for context7.

A fun JavaScript library that prints "Hello World" (or any custom text) in ASCII art using 1s and 0s, with customizable characters and styling options.

Installation

npm install fancyhelloworld

Or if using locally:

npm install

Basic Usage

const { fancyHelloWorld } = require("./index.js");

// Print "HELLO WORLD" in ASCII art with 1s and 0s
fancyHelloWorld();

Output:

1   1 11111 1     1      111   1   1  111  1111  1     1111
1   1 1     1     1     1   1  1   1 1   1 1   1 1     1   1
11111 1111  1     1     1   1  1   1 1   1 1111  1     1   1
1   1 1     1     1     1   1  1 0 1 1   1 1 1   1     1   1
1   1 1     1     1     1   1  1 0 1 1   1 1  1  1     1   1
1   1 1     1     1     1   1  10 01 1   1 1   1 1     1   1
1   1 11111 11111 11111  111   1   1  111  1   1 11111 1111

Configuration Options

The fancyHelloWorld() function accepts an options object with the following properties:

| Option | Type | Default | Description | | --------------- | ------- | --------------- | ----------------------------------------------------------- | | text | string | 'HELLO WORLD' | Custom text to display | | caseSensitive | boolean | false | Whether to preserve case (converts to uppercase by default) | | letterSpacing | number | 1 | Extra spaces between letters | | fillChar | string | '1' | Character to use for filled pixels | | emptyChar | string | '0' | Character to use for empty pixels |

Examples

Example 1: Custom Text (Case-Insensitive)

const { fancyHelloWorld } = require("./index.js");

// Works with lowercase, uppercase, or mixed case
fancyHelloWorld({ text: "hello world" });
fancyHelloWorld({ text: "HELLO" });
fancyHelloWorld({ text: "WoRLd" });

All three will be converted to uppercase and displayed correctly.

Example 2: Custom Characters (Block Style)

const { fancyHelloWorld } = require("./index.js");

// Use block characters for a solid look
fancyHelloWorld({
  text: "HELLO",
  fillChar: "█",
  emptyChar: "░",
});

Output:

█   █ █████ █     █      ███
█   █ █     █     █     █   █
█████ ████  █     █     █   █
█   █ █     █     █     █   █
█   █ █     █     █     █   █
█   █ █     █     █     █   █
█   █ █████ █████ █████  ███

Example 3: Asterisks and Dots

const { fancyHelloWorld } = require("./index.js");

// Use asterisks and dots for a classic look
fancyHelloWorld({
  text: "WORLD",
  fillChar: "*",
  emptyChar: ".",
});

Output:

*   * .*** ***** *     ****
*   * *   * *   * *     *   *
*   * *   * *   * *     *   *
* . * *   * *   * *     *   *
* . * *   * *   * *     *   *
** ** *   * *   * *     *   *
*   * .*** ***** ***** ****

Example 4: Increased Letter Spacing

const { fancyHelloWorld } = require("./index.js");

// Add more space between letters for better readability
fancyHelloWorld({
  text: "HELLO",
  letterSpacing: 3,
});

This will add 3 spaces between each letter instead of the default 1.

Example 5: Emoji Style

const { fancyHelloWorld } = require("./index.js");

// Use emojis for a fun look
fancyHelloWorld({
  text: "HELLO",
  fillChar: "🔥",
  emptyChar: "💧",
});

Example 6: Hash and Dash Style

const { fancyHelloWorld } = require("./index.js");

// Programming/terminal style
fancyHelloWorld({
  text: "HELLO",
  fillChar: "#",
  emptyChar: "-",
  letterSpacing: 2,
});

Example 7: X and O Pattern

const { fancyHelloWorld } = require("./index.js");

// Tic-tac-toe style
fancyHelloWorld({
  text: "WORLD",
  fillChar: "X",
  emptyChar: "O",
});

Supported Characters

Currently supported letters:

  • Letters: H, E, L, O, W, R, D
  • Special: Space

More letters can be added to the library by extending the letters object in the source code.

API Reference

fancyHelloWorld(options)

Prints text in ASCII art using 1s and 0s (or custom characters).

Parameters:

  • options (Object, optional): Configuration options
    • options.text (string): The text to display
    • options.caseSensitive (boolean): Preserve original case
    • options.letterSpacing (number): Spaces between letters
    • options.fillChar (string): Character for filled pixels
    • options.emptyChar (string): Character for empty pixels

Returns: void (prints to console)

Example:

fancyHelloWorld({
  text: "hello",
  fillChar: "*",
  emptyChar: ".",
  letterSpacing: 2,
});

License

MIT

Contributing

Feel free to submit issues and pull requests to add more letters or features!