Testing actions

This commit is contained in:
Janos 2021-07-28 08:24:31 +02:00
commit 8a260b16ec
No known key found for this signature in database
GPG key ID: 465EF45E51CBA2BA
340 changed files with 72676 additions and 0 deletions

View file

@ -0,0 +1,11 @@
const urlVariableRegex = /\{[^}]+\}/g;
function removeNonChars(variableName) {
return variableName.replace(/^\W+|\W+$/g, "").split(/,/);
}
export function extractUrlVariableNames(url) {
const matches = url.match(urlVariableRegex);
if (!matches) {
return [];
}
return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);
}