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

ascii-art-font

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ascii-art-font

``` _ _ _ (_)(_) | | __ _ ___ ___ _ _ ______ __ _ _ __ | |_ / _` |/ __| / __|| || ||______| / _` || '__|| __| | (_| |\__ \| (__ | || | | (_| || | | |_ \_

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2K
decreased by-3.69%
Maintainers
1
Weekly downloads
 
Created
Source
                   _  _                       _
                  (_)(_)                     | |
  __ _  ___   ___  _  _  ______   __ _  _ __ | |_
 / _` |/ __| / __|| || ||______| / _` || '__|| __|
| (_| |\__ \| (__ | || |        | (_| || |   | |_
 \__,_||___/ \___||_||_|         \__,_||_|    \__|

ascii-art-font.js

NPM version npm Travis

This module handles the installation, rendering and management of figlet fonts.

Figlet fonts are an ASCII art font standard, widely used for terminal output.

It looks something like this:

______                          _
|  _  \                        | |
| | | |  ___  _ __ ___    ___  | |
| | | | / _ \| '_ ` _ \  / _ \ | |
| |/ / |  __/| | | | | || (_) ||_|
|___/   \___||_| |_| |_| \___/ (_)

Installation

npm install ascii-art-table

Usage

require('ascii-art-font')

To do anything with it, you'll need to include the library:

const Font = require('ascii-art-font');

Font.create(text, styles, handler)

Map through an ansi string one character at a time, without any of those characters being styles.

Kind: static property of ascii-art-font

ParamTypeDescription
textstringthe string to render in block form
stylesstringthe styles to apply to all lines
callbackfunction(err, result)the callback

Example

To set the directory of the fonts:

    Font.fontPath = 'Fonts';

Then to render some text:

    Font.create('my text', 'Doom', function(rendered){
        //do stuff here
    });

FAQs

Package last updated on 28 Oct 2019

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