GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — goo/readline1.js at master · singcl/goo Expand file tree/ Copy pathreadline1.jsMore file actions 26 lines (22 loc) · 499 Bytes / Copy pathreadline1.jsFile metadata and controls26 lines (22 loc) · 499 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 const readline = require('readline'); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, prompt: '$>' }); rl.prompt(); rl.on('line', (line) => { switch (line.trim()) { case 'hello': console.log('world!'); break; default: console.log(`你输入的是:'${line.trim()}'`); break; } rl.prompt(); }); rl.on('close', () => { console.log('再见!'); process.exit(0); }); |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |