MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / escapeRegexSymbols

Function escapeRegexSymbols

packages/core/utils/common.ts:28–32  ·  view source on GitHub ↗
(source: string)

Source from the content-addressed store, hash-verified

26export const SYSTEM_PREFIX = 'sys://';
27
28export function escapeRegexSymbols(source: string): string {
29 const escapeRegex = /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g;
30
31 return source.replace(escapeRegex, '\\$&');
32}
33
34export function convertString(value: any): any {
35 let result;

Callers 1

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected