DALGLI0/03-rozwiazanie.js
Kacper Kruczek 140e6a4606 03 encode
2018-07-01 13:37:23 +02:00

13 lines
255 B
JavaScript

const crc = require("./crc.js");
let message = process.argv[3];
let flag = process.argv[2];
switch (flag) {
case '-e':
console.log(crc.encode(message));
break;
case '-d':
break;
default:
throw "incorect flag"
}