-
chalk
- Description: Style your terminal output with colors and styles.
-
Example:
const chalk = require('chalk'); console.log(chalk.blue('Hello world!'));
-
figlet
- Description: Create ASCII art text in the terminal.
-
Example:
const figlet = require('figlet'); figlet('Hello World!', function(err, data) { if (err) { console.log('Something went wrong...'); console.dir(err); return; } console.log(data); });
-
ora
- Description: Elegant terminal spinner.
-
Example:
const ora = require('ora'); const spinner = ora('Loading unicorns').start(); setTimeout(() => { spinner.color = 'yellow'; spinner.text = 'Loading rainbows'; }, 1000);
-
inquirer
- Description: Interactive command-line user interface.
-
Example:
const inquirer = require('inquirer'); inquirer.prompt([ { type: 'input', name: 'name', message: "What's your name?" } ]).then(answers => { console.log(`Hello, ${answers.name}!`); });
-
randomcolor
- Description: Generate attractive random colors.
-
Example:
const randomColor = require('randomcolor'); const color = randomColor(); console.log(color);
-
faker
- Description: Generate massive amounts of fake data.
-
Example:
const faker = require('faker'); console.log(faker.name.findName());
-
axios
- Description: Promise-based HTTP client for the browser and Node.js.
-
Example:
const axios = require('axios'); axios.get('<https://jsonplaceholder.typicode.com/posts/1>') .then(response => console.log(response.data)) .catch(error => console.error(error));
-
moment
- Description: Parse, validate, manipulate, and display dates and times.
-
Example:
const moment = require('moment'); console.log(moment().format('MMMM Do YYYY, h:mm:ss a'));
-
boxen
- Description: Create boxes in the terminal.
-
Example:
const boxen = require('boxen'); console.log(boxen('Hello, Box!', { padding: 1 }));
-
node-fetch
- Description: A lightweight module that brings window.fetch to Node.js.
-
Example:
const fetch = require('node-fetch'); fetch('<https://jsonplaceholder.typicode.com/posts/1>') .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error(error));
-
lodash
- Description: A modern JavaScript utility library delivering modularity, performance, & extras.
-
Example:
const _ = require('lodash'); const array = [1, 2, 3, 4, 5]; console.log(_.shuffle(array));
-
node-notifier
- Description: A Node.js module for sending notifications on native Mac, Windows (post and pre 8) and Linux (or Growl as fallback).
-
Example:
const notifier = require('node-notifier'); notifier.notify({ title: 'My Notification', message: 'Hello, there!' });
-
dotenv
-
Description: Loads environment variables from a
.env
file intoprocess.env
. -
Example:
require('dotenv').config(); console.log(process.env.DB_HOST);
-
Description: Loads environment variables from a
-
crypto-random-string
- Description: Generate a cryptographically strong random string.
-
Example:
const cryptoRandomString = require('crypto-random-string'); console.log(cryptoRandomString({ length: 10 }));
-
ascii-art
- Description: Generate ASCII art from text.
-
Example:
const ascii = require('ascii-art'); ascii.font('Hello World!', 'Doom', function(rendered) { console.log(rendered); });
-
node-emoji
- Description: Simple emoji support for Node.js projects.
-
Example:
const emoji = require('node-emoji'); console.log(emoji.get('coffee'));
-
is-online
- Description: Check if the internet connection is available.
-
Example:
javascriptCopy code const isOnline = require('is-online'); isOnline().then(online => { console.log(online ? 'Online' : 'Offline'); });
-
number-to-words
- Description: Convert numbers to words.
-
Example:
javascriptCopy code const numberToWords = require('number-to-words'); console.log(numberToWords.toWords(123));
-
nodemailer
- Description: It is a module for sending emails from Node.js applications.
-
Example:
javascriptCopy code const nodemailer = require('nodemailer'); const transporter = nodemailer.createTransport({ service: 'gmail', auth: { user: 'your-email@gmail.com', pass: 'your-password' } }); const mailOptions = { from: 'your-email@gmail.com', to: 'recipient@example.com', subject: 'Sending Email using Node.js', text: 'Hello from Node.js!' }; transporter.sendMail(mailOptions, function(error, info) { if (error) { console.error(error); } else { console.log('Email sent: ' + info.response); }
-
beeper
- Description: makes your terminal beep.
-
Example:
javascriptCopy code const beeper = require('beeper'); beeper();
-
funny-quotes
- Description: fetches random funny quotes.
-
Example:
javascriptCopy code const funnyQuotes = require('funny-quotes'); console.log(funnyQuotes.getRandomQuote());
-
random-puppy
- Description: fetches random puppy pictures from Reddit.
-
Example:
javascriptCopy code const randomPuppy = require('random-puppy'); randomPuppy() .then(url => console.log(url)) .catch(err => console.error(err));
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)