MCPcopy Create free account
hub / github.com/DHTMLX/scheduler / parseLine

Function parseLine

codebase/sources/dhtmlxscheduler.js:17054–17072  ·  view source on GitHub ↗
(rfcString)

Source from the content-addressed store, hash-verified

17052 return options;
17053 }
17054 function parseLine(rfcString) {
17055 rfcString = rfcString.replace(/^\s+|\s+$/, "");
17056 if (!rfcString.length)
17057 return null;
17058 var header = /^([A-Z]+?)[:;]/.exec(rfcString.toUpperCase());
17059 if (!header) {
17060 return parseRrule(rfcString);
17061 }
17062 var key = header[1];
17063 switch (key.toUpperCase()) {
17064 case "RRULE":
17065 case "EXRULE":
17066 return parseRrule(rfcString);
17067 case "DTSTART":
17068 return parseDtstart(rfcString);
17069 default:
17070 throw new Error("Unsupported RFC prop ".concat(key, " in ").concat(rfcString));
17071 }
17072 }
17073 function parseRrule(line) {
17074 var strippedLine = line.replace(/^RRULE:/i, "");
17075 var options = parseDtstart(strippedLine);

Callers

nothing calls this directly

Calls 2

parseRruleFunction · 0.70
parseDtstartFunction · 0.70

Tested by

no test coverage detected