mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 20:11:24 +08:00
Expose configurable attributes property when loading components
This commit is contained in:
@ -34,10 +34,12 @@ export function escapeRegexSymbols(source: string): string {
|
||||
return source.replace(escapeRegex, "\\$&");
|
||||
}
|
||||
|
||||
export function convertString(value: string): any {
|
||||
export function convertString(value: any): any {
|
||||
var result;
|
||||
|
||||
if (value.trim() === "") {
|
||||
|
||||
if (!types.isString(value)) {
|
||||
result = value;
|
||||
} else if (value.trim() === "") {
|
||||
result = value;
|
||||
} else {
|
||||
// Try to convert value to number.
|
||||
@ -50,7 +52,7 @@ export function convertString(value: string): any {
|
||||
result = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -131,4 +133,4 @@ export function isDataURI(uri: string): boolean {
|
||||
var firstSegment = uri.trim().split(',')[0];
|
||||
|
||||
return firstSegment && firstSegment.indexOf("data:") === 0 && firstSegment.indexOf('base64') >= 0;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user