Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More โ†’
Socket
Sign inDemoInstall
Socket

figlet

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

figlet

Creates ASCII Art from text. A full implementation of the FIGfont spec.

  • 1.8.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2M
decreased by-4.46%
Maintainers
1
Weekly downloads
ย 
Created

What is figlet?

The figlet npm package allows you to create text banners in various ASCII art fonts. It is useful for adding stylistic text to command-line interfaces, logs, or any text-based output.

What are figlet's main functionalities?

Basic Text to ASCII Art Conversion

This feature allows you to convert a simple string into an ASCII art representation. The code sample demonstrates how to convert the string 'Hello, World!' into ASCII art.

const figlet = require('figlet');
figlet('Hello, World!', function(err, data) {
  if (err) {
    console.log('Something went wrong...');
    console.dir(err);
    return;
  }
  console.log(data);
});

Custom Fonts

This feature allows you to specify a custom font for the ASCII art. The code sample demonstrates how to use the 'Ghost' font to render the string 'Hello, World!'.

const figlet = require('figlet');
figlet.text('Hello, World!', {
  font: 'Ghost'
}, function(err, data) {
  if (err) {
    console.log('Something went wrong...');
    console.dir(err);
    return;
  }
  console.log(data);
});

Synchronous API

This feature provides a synchronous API for converting text to ASCII art. The code sample demonstrates how to synchronously convert the string 'Hello, World!' into ASCII art.

const figlet = require('figlet');
console.log(figlet.textSync('Hello, World!'));

Other packages similar to figlet

Keywords

FAQs

Package last updated on 09 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc