hadith-cli
Version:
This is a CLI for hadith on terminal
1 lines • 950 B
JavaScript
const gradient=require("gradient-string"),chalk=require("chalk"),DisplayMessage=(e,o)=>{try{return void(e&&o.by&&o.text&&o.info?(console.log(gradient("pink","cyan","yellow").multiline(`Hadith ☝ : ${o.text}`)),console.log(gradient("cyan","pink")(`Book Name : ${e}`)),console.log(chalk.magenta.inverse(`${chalk.magenta.inverse("Narrated By ✍ :")} ${o.by}`)),console.log(`${chalk.yellow.inverse(`${o.info}`)}`)):(console.log(gradient("cyan","pink")("Oh no, we haven't got the hadith you are looking for, probably you can raise a PR for that?")),console.log(gradient("yellow","green")("here is the repo - https://github.com/AshifMohammad/hadith.cli"))))}catch(e){console.log(gradient("cyan","pink")("Oh no, we haven't got the hadith you are looking for, probably you can raise a PR for that?")),console.log(gradient("yellow","green")("here is the repo - https://github.com/AshifMohammad/hadith.cli"))}};module.exports={DisplayMessage:DisplayMessage};