Add validation/parsing for the FlexboxLayout properties

Make FlexboxLayout work with CSS properties, shorhands are not yet supported

Make shorthand properties

Remove redundant logging
This commit is contained in:
PanayotCankov
2016-11-04 21:15:11 +02:00
committed by Panayot Cankov
parent d4846481c3
commit 0029a8afcc
7 changed files with 308 additions and 143 deletions

View File

@@ -13,6 +13,13 @@
*/
export function isNumber(value: any): boolean;
/**
* A function that checks if something is a valid boolean.
* @param value The value which will be checked.
* Returns true if value is a boolean.
*/
export function isBoolean(value: any): boolean;
/**
* A function that checks if something is a function.
* @param value The value which will be checked.

View File

@@ -6,6 +6,10 @@ export function isNumber(value: any): boolean {
return typeof value === "number" || value instanceof Number;
}
export function isBoolean(value: any): boolean {
return typeof value === "boolean" || value instanceof Boolean;
}
export function isFunction(value: any): boolean {
if (!value) {
return false;