24 lines
615 B
JavaScript
24 lines
615 B
JavaScript
"use strict";
|
|
exports.__esModule = true;
|
|
exports.spam = void 0;
|
|
function spam(args) {
|
|
var buf = "";
|
|
var numtimes = parseInt(args[0]);
|
|
if (isNaN(numtimes)) {
|
|
buf += "Error: " + args[0] + " is not a number\n";
|
|
}
|
|
else if (numtimes < 0) {
|
|
buf += "Error: " + args[0] + " is negative\n";
|
|
}
|
|
else if (numtimes > 100) {
|
|
buf += "Error: " + args[0] + " is too large\n";
|
|
}
|
|
else {
|
|
for (var i = 0; i < numtimes; i++) {
|
|
buf += args.slice(1).join(" ") + "\n";
|
|
}
|
|
return buf;
|
|
}
|
|
}
|
|
exports.spam = spam;
|
|
//# sourceMappingURL=spam.js.map
|