MCPcopy Create free account
hub / github.com/cujojs/poly / convertPathMatcher

Function convertPathMatcher

test/curl.js:419–428  ·  view source on GitHub ↗
(cfg)

Source from the content-addressed store, hash-verified

417
418 // adds the path matching regexp onto the cfg or plugin cfgs.
419 function convertPathMatcher (cfg) {
420 var pathMap = cfg.pathMap;
421 cfg.pathRx = new RegExp('^(' +
422 cfg.pathList.sort(function (a, b) { return pathMap[a].specificity < pathMap[b].specificity; } )
423 .join('|')
424 .replace(/\//g, '\\/') +
425 ')(?=\\/|$)'
426 );
427 delete cfg.pathList;
428 }
429
430 // fix all paths and packages
431 fixAndPushPaths(cfg['paths'], false);

Callers 1

curl.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected