Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/electric-sql/electric
/ globToRegex
Function
globToRegex
scripts/check-changeset.mjs:95–98 ·
view source on GitHub ↗
(g)
Source
from the content-addressed store, hash-verified
93
}
94
95
function
globToRegex(g) {
96
const
escaped = g.replace(/[.+^${}()|[\]\\]/g, `\\$&`).replace(/\*/g, `.*`)
97
return
new
RegExp(`^${escaped}$`)
98
}
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected