MCPcopy Create free account
hub / github.com/experdot/pointer / escapeRegExp

Function escapeRegExp

src/renderer/src/services/pagesService.ts:37–39  ·  view source on GitHub ↗

* Escape special regex characters in a string

(str: string)

Source from the content-addressed store, hash-verified

35 * Escape special regex characters in a string
36 */
37function escapeRegExp(str: string): string {
38 return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
39}
40
41// 计算新项目的插入位置和 order,并更新同级项目的 order
42async function prepareInsertPosition(afterItemId?: string): Promise<{

Callers 1

generateUniqueNameFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected