node_modules

This commit is contained in:
softprops 2019-09-09 20:03:40 +09:00
parent 722f21acbd
commit 67ba06729b
445 changed files with 83958 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), []);
}