10 lines
167 B
JavaScript
Raw Normal View History

2020-05-19 11:43:42 +03:00
var parse = require('url').parse;
exports.pathMatch = function(url, path) {
try {
return parse(url).pathname === path;
} catch (e) {
return false;
}
};