#!/usr/bin/env node; /****************************************************************************** * This program reads bytes from STDIN and prints them in decimal format. * * Copyright © 2020 Richard Lesh. All rights reserved. *****************************************************************************/ const Utils = require('./Utils'); const main = async () => { let c; let count = 0; while ((c = await Utils.getbyte(process.stdin)) != -1) { process.stdout.write(c + " "); ++count; if (count % 20 === 0) { console.log(); } } if (count % 20 !== 0) { console.log(); } } main().catch( e => { console.error(e) } );