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

usp-fun

v1.0.0

Published

usplab is a personal experimentation and utility toolkit developed by Uday Shankar Purbey. Designed as a flexible playground, this package serves as a sandbox for testing features, prototyping modules, and sharing reusable code components for development

Readme

usp-fun

Description

usp-fun is a lightweight Node.js package that allows you to print text in a beautiful, colorful ASCII art style. It uses the figlet library to generate ASCII art from your input text and applies a gradient color effect using chalk. Perfect for adding some fun and visual flair to console outputs in scripts, CLIs, or just for entertainment!

This package provides a single asynchronous function, printNameBeautifully, which handles the rendering and printing of the stylized text.

Installation

You can install usp-fun via npm:

npm install usp-fun

Note: This package requires Node.js and has dependencies on figlet and chalk, which will be installed automatically.

Usage

Import the package and call the printNameBeautifully function with your desired text. It's an async function, so use await or handle the promise.

Basic Example

const { printNameBeautifully } = require('usp-fun');

async function main() {
  await printNameBeautifully('Hello World!');
}

main();

This will print "Hello World!" in colorful ASCII art using the default 'Standard' font and a rainbow-like color gradient (red, yellow, green, cyan, blue, magenta).

With Options

You can customize the colors and font:

const { printNameBeautifully } = require('usp-fun');

async function main() {
  await printNameBeautifully('Custom Fun', {
    colors: ['white', 'gray', 'blackBright'],
    font: 'Big'
  });
}

main();

API Reference

printNameBeautifully(text, options = {})

Prints the given text in figlet style with a colorful gradient effect.

Parameters:

  • text (string): The text to print. Required.

  • options (Object): Optional configuration.

    • colors (string[]): Array of chalk color names to cycle through for the gradient effect. Defaults to ['red', 'yellow', 'green', 'cyan', 'blue', 'magenta'].
    • font (string): Figlet font name. Defaults to 'Standard'. For a list of available fonts, refer to the figlet documentation.

Returns: Promise<void> – Resolves when the text is printed, or rejects on error (e.g., invalid font).

Throws: Error if figlet encounters an issue (e.g., unknown font).

Dependencies

  • figlet: For generating ASCII art.
  • chalk: For applying colors to the console output.

These are peer dependencies and will be installed when you run npm install usp-fun.

Examples

Default Usage

Input:

await printNameBeautifully('USP Fun');

Output (in console, with colors):

text
A colorful ASCII art representation of "USP Fun" in the Standard font.

Custom Colors and Font

Input:

await printNameBeautifully('Grok It', {
  colors: ['blue', 'cyan'],
  font: 'Slant'
});

This will cycle between blue and cyan for a cool, watery gradient effect in the 'Slant' font.

Tags

  • ascii-art
  • console
  • figlet
  • chalk
  • colorful-text
  • fun
  • cli-decoration
  • text-styling

License

MIT License. Feel free to use, modify, and distribute!

Contributing

If you'd like to contribute, fork the repo, make your changes, and submit a pull request. Issues and feature requests are welcome!