GPR authentication support

This commit is contained in:
Alex Mullans authored and Alex Mullans committed 2019-10-03 16:35:25 -07:00
1 parent 6c0e2a2a6b
commit 6bd4969ec6
518 files changed
+95599 -2875

No files matched your search

@@ -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), []);
}