try with exec sh

This commit is contained in:
ibrahim0814
2019-11-13 23:41:15 -08:00
parent 7ba41fc0d6
commit db0171f588
1059 changed files with 237707 additions and 41 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), []);
}