MCPcopy Create free account
hub / github.com/CoderLine/alphaTab / escapeRegExp

Function escapeRegExp

packages/tooling/src/vite.ts:91–93  ·  view source on GitHub ↗

* Builds Vite `resolve.alias` entries from the project's `tsconfig.json` * `compilerOptions.paths`. `tsconfig.base.json` is the single source of truth; * `ts.parseJsonConfigFileContent` handles the `extends` chain and the * `${configDir}` template substitution.

(input: string)

Source from the content-addressed store, hash-verified

89 * `${configDir}` template substitution.
90 */
91function escapeRegExp(input: string): string {
92 return input.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
93}
94
95export function buildTsconfigAliases(projectDir: string): Array<{ find: RegExp; replacement: string }> {
96 const tsconfigPath = ts.findConfigFile(projectDir, ts.sys.fileExists);

Callers 1

buildTsconfigAliasesFunction · 0.85

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected