Skip to content

Commit

Permalink
lib: accept regexp as path
Browse files Browse the repository at this point in the history
  • Loading branch information
logicalparadox committed Jan 29, 2013
1 parent 81a9898 commit ca5e49a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/parsePath.js
@@ -1,5 +1,7 @@

module.exports = function (path, keys, opts) {
if (path instanceof RegExp) return path;

keys = keys || [];
opts = opts || {};
var re = /(\.)?:(\w+)(\?)?/g;
Expand Down

0 comments on commit ca5e49a

Please sign in to comment.