release v1

This commit is contained in:
Shawn Napora
2019-08-06 17:37:58 -04:00
parent df4ea523fe
commit c607b751c2
540 changed files with 92301 additions and 5 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), []);
}