const chalk = require('chalk'); console.log(chalk.red('Hello, world! This text is in red!'));
const chalk = require('chalk'); console.log(chalk.yellow.underline('This text is underlined!'));This code uses the `yellow` and `underline` methods of the chalk library to print the text "This text is underlined!" in yellow color with an underline effect in the console. In conclusion, the package library used in these examples is the chalk library, which provides an easy and clean way to style console output with colors and styles.