Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function getViewParams(url, view) {
const match = view.regex.exec(url);
if (match) {
match.shift();
return zip(view.params, match);
} else {
return null;
}
}