13 lines
255 B
JavaScript
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"
|
|
} |