helpers.js 168 B

123456789
  1. var parse = require('url').parse;
  2. exports.pathMatch = function (url, path) {
  3. try {
  4. return parse(url).pathname === path;
  5. } catch (e) {
  6. return false;
  7. }
  8. };