MCPcopy Create free account
hub / github.com/Shazbot/WH3-Mod-Manager / escapeRegExp

Function escapeRegExp

src/packFileSerializer.ts:3247–3249  ·  view source on GitHub ↗
(string: string)

Source from the content-addressed store, hash-verified

3245};
3246// Helper function to escape special regex characters for literal string matching
3247const escapeRegExp = (string: string): string => {
3248 return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
3249};
3250// Buffer pool for efficient memory reuse during pack operations
3251class BufferPool {
3252 private pools = new Map<number, Buffer[]>();

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected