MCPcopy Create free account
hub / github.com/chakra-ui/panda / toMatcher

Function toMatcher

scripts/rm.mjs:10–14  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

8const RM = { recursive: true, force: true, maxRetries: 3, retryDelay: 100 }
9
10const toMatcher = (name) => {
11 if (!name.includes('*')) return (entry) => entry === name
12 const re = new RegExp('^' + name.replace(/[.+^${}()|[\]\\]/g, '\\$&').replace(/\*/g, '.*') + '$')
13 return (entry) => re.test(entry)
14}
15
16const walkRemove = (dir, match, removeNodeModules) => {
17 let entries

Callers 1

rm.mjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected