revert me: integration testing

This commit is contained in:
softprops 2019-09-17 13:10:47 +09:00
parent 9f9f2a3ed2
commit 5f2e9fb50f
445 changed files with 83960 additions and 1 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), []);
}