index.js
function pathmap(path, spec, callback) {
  return spec.replace(regexp, function(match, replace, count, token) {
    var pattern;
    if (pattern = pathmap.patterns[token]) {
      return pattern.call(path, replace, count, callback);
    } else {
      throw new Error(
        'Unknown pathmap specifier ' + match + ' in "' + spec + '"');
    }
  });
}
function pathmap(path, spec, callback) {
  return spec.replace(regexp, function(match, replace, count, token) {
    var pattern;
    if (pattern = pathmap.patterns[token]) {
      return pattern.call(path, replace, count, callback);
    } else {
      throw new Error(
        'Unknown pathmap specifier ' + match + ' in "' + spec + '"');
    }
  });
}
function pathmap ( path , spec , callback ) { return spec . replace ( regexp , function ( match , replace , count , token ) { var pattern ; if ( pattern = pathmap . patterns [ token ] ) { return pattern . call ( path , replace , count , callback ) ; } else { throw new Error ( 'Unknown pathmap specifier ' + match + ' in "' + spec + '"' ) ; } } ) ; }
Maps a path to a path spec.
Maps a path to a path spec .