UNPKG

@syedahoorainali/giaic

Version:

A vibrant Command-Line Interface for managing student records, built with TypeScript.

28 lines (22 loc) 817 B
import chalk from "chalk"; import Table from 'cli-table' import { Student } from "../utils.js" // Function to see student details const seeDetails = async (student: Student) => { console.log(''); // Create a new table using cli-table const table = new Table(); // Add all the student data to table table.push( { "Roll No": student.rollNo }, { "Name": student.name }, { "Father name": student.fatherName }, { "Course": student.course }, { "Balance": String(student.balance) }, { "Fees": String(student.fees) }, { "Paid": student.isPaid ? 'YES' : 'NO' }, ); console.log(chalk.yellowBright.bold("Student Information")); console.log(table.toString()); // Print table } export default seeDetails;