UNPKG

jabber

Version:

Simple random word, paragraph, lorem ipsum, dummy text generator, fake name, email.

35 lines (33 loc) 1.01 kB
#!/usr/bin/env node "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const __1 = __importDefault(require("..")); const [, , ...args] = process.argv; const jabber = new __1.default(); switch (args[0]) { case "-w": // console.log('Word of length', args[1]); console.log(jabber.createWord(parseInt(args[1]))); break; case "-p": // console.log('Paragraph of length', args[1]); console.log(jabber.createParagraph(parseInt(args[1]))); break; case "-h": default: hr(); console.log("[?] Jabber Help!"); hr(); console.log(` Commands -w <opt-length> \t Create Word of length provided -p <opt-length> \t Create Paragraph of length of provided number of words `); break; } function hr() { console.log(`=========================`); }