mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Support for hierarchical and attribute css selectors.
This commit is contained in:
@@ -29,6 +29,11 @@ export function parseJSON(source: string): any {
|
||||
return JSON.parse(src);
|
||||
}
|
||||
|
||||
export function escapeRegexSymbols(source: string): string {
|
||||
let escapeRegex = /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g;
|
||||
return source.replace(escapeRegex, "\\$&");
|
||||
}
|
||||
|
||||
export module layout {
|
||||
|
||||
var MODE_SHIFT = 30;
|
||||
|
||||
6
utils/utils.d.ts
vendored
6
utils/utils.d.ts
vendored
@@ -229,4 +229,10 @@
|
||||
* @param url The url.
|
||||
*/
|
||||
export function openUrl(url: string): boolean
|
||||
|
||||
/**
|
||||
* Escapes special regex symbols (., *, ^, $ and so on) in string in order to create a valid regex from it.
|
||||
* @param source The original value.
|
||||
*/
|
||||
export function escapeRegexSymbols(source: string): string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user