UNPKG

next-redis-cache

Version:

A package to manage redis caching of genrated pages through next.js .

23 lines (17 loc) 438 B
"use strict"; function validatePath(path, includes, excludes) { var includeFounded = includes.filter(function (regExp) { return regExp.test(path); }); if (includeFounded.length) { var excludeFounded = excludes.filter(function (regExp) { return !(regExp && regExp.test(path)); }); if (excludeFounded.length) { return true; } return false; } return false; } module.exports = validatePath;