MCPcopy Index your code
hub / github.com/ilearnio/module-alias / isPathMatchesAlias

Function isPathMatchesAlias

index.js:52–60  ·  view source on GitHub ↗
(path, alias)

Source from the content-addressed store, hash-verified

50}
51
52function isPathMatchesAlias (path, alias) {
53 // Matching /^alias(\/|$)/
54 if (path.indexOf(alias) === 0) {
55 if (path.length === alias.length) return true
56 if (path[alias.length] === '/') return true
57 }
58
59 return false
60}
61
62function addPathHelper (path, targetArray) {
63 path = nodePath.normalize(path)

Callers 1

index.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected