mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-22 15:18:34 +00:00
15 lines
368 B
JavaScript
15 lines
368 B
JavaScript
// Copyright (C) 2017-2023 Smart code 203358507
|
|
|
|
const routeConfigForPath = (viewsConfig, path) => {
|
|
for (const viewConfig of viewsConfig) {
|
|
for (const routeConfig of viewConfig) {
|
|
if (path.match(routeConfig.regexp)) {
|
|
return routeConfig;
|
|
}
|
|
}
|
|
}
|
|
|
|
return null;
|
|
};
|
|
|
|
module.exports = routeConfigForPath;
|