Skip to content

Commit

Permalink
check for name
Browse files Browse the repository at this point in the history
  • Loading branch information
FallBackITA27 committed Apr 11, 2024
1 parent 5a10376 commit 1bd1692
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion mkwpp-parser/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,20 @@ document.addEventListener("DOMContentLoaded", async function() {

document.getElementById("readInput").addEventListener("click", async function() {
let parserData = document.getElementById("inputTextArea").value.split("\n").filter(r=>r !== "");
console.log(parserData);
let currentSubmission = {
name: "",
date: "",
flapCatch: false,
noscCatch: false,
};
for (let line of parserData) {
let keywords = line.toLowerCase().split(" ").filter(r=>r !== "");
console.log(keywords);
if (keywords[0] === "name") {
let name = keywords.slice(1,keywords.length).join(" ");
console.log(name);
}
}
});

/* example data
Expand Down

0 comments on commit 1bd1692

Please sign in to comment.