10 lines
167 B
JavaScript
10 lines
167 B
JavaScript
var parse = require('url').parse;
|
|
|
|
exports.pathMatch = function(url, path) {
|
|
try {
|
|
return parse(url).pathname === path;
|
|
} catch (e) {
|
|
return false;
|
|
}
|
|
};
|