Socket
Socket
Sign inDemoInstall

ascii-art-font

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ascii-art-font

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


Version published
Weekly downloads
1.4K
decreased by-21.27%
Maintainers
1
Install size
22.8 kB
Created
Weekly downloads
 

Readme

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
    });

Keywords

FAQs

Last updated on 07 Dec 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc