UNPKG

@softwareventures/maintain-project

Version:

Automatically create and maintain TypeScript projects with standard settings for Software Ventures Limited

20 lines 458 B
export function scanSpdxExpression(text) { return text .trim() .split(/\s+|(?=[+()])|(?<=[+()])/u) .map(tokenOf); } function tokenOf(text) { if (text === "AND" || text === "OR" || text === "WITH" || text === "(" || text === ")" || text === "+") { return { type: text, text }; } else { return { type: "identifier", text }; } } //# sourceMappingURL=scan.js.map