figlet-promised

1.0.0 • Public • Published

Figlet Promised

A version of Figlet with promises.

Created to make learning Promises and async/await approachable and fun.

Use it like this

Use it with a promise.

const figlet = require("figlet-promised");
figlet("Felix").then(function(result){
    console.log(result);
});

Use it with async/await.

const figlet = require("figlet-promised");
async function runFiglet() {
    const result = await figlet("Felix");
    console.log(result);
}
runFiglet();

Use it with Promise.all to create multiple ascii decorated words.

Promise
    .all([figlet("Luca"), figlet("Felix")])
    .then(function(results){
 
        results.forEach(function(name) {
            console.log(name);
        });
    });

Package Sidebar

Install

npm i figlet-promised

Weekly Downloads

38

Version

1.0.0

License

ISC

Unpacked Size

3.19 kB

Total Files

5

Last publish

Collaborators

  • avermeulen