From ebced9b5bf6ecfeb6383ae93451bba9175c901c1 Mon Sep 17 00:00:00 2001 From: amy Date: Fri, 1 Sep 2023 13:59:10 -0500 Subject: better meta parsing (yes im working on this again:3) --- src/common.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/common.js') diff --git a/src/common.js b/src/common.js index 3c8fcb4..d6e187b 100644 --- a/src/common.js +++ b/src/common.js @@ -10,6 +10,18 @@ function appendHtml(el, str) { } } +function meta_parse(inp){ + inp = inp.split(" ") + inp.shift() + inp = inp.join(" ").split(",") + //console.log(inp) + let r = {}; + for(let i of inp){ + i = i.trim() + r[i.split(" ")[0]] = i.split(" ")[1]; + } + return r +} const rem_emp = function (e) {return e !== "";}; -- cgit v1.2.3