| getPlatform |
getPlatform()
|
|
Returns the platform/os the user is running on. Used to align the app's behavior with the user's expectations (e.g. keyboard shortcuts). Example :
Returns :
TPlatform
|
| guid |
guid()
|
|
Generate and return a random UUID (GUID). Example :
Returns :
string
|
| isUrlSafe | ||||||||
isUrlSafe(url: string)
|
||||||||
|
Checks if a URL is safe to use (not a dangerous scheme like javascript:)
Parameters :
Returns :
boolean
true if the URL is safe, false otherwise |
| validateDate |
validateDate()
|
|
Checks whether the date is valid. Only basic validation. Example :
Returns :
ValidatorFn
|
| validateDateIsInTheFuture | |||||||||||||||
validateDateIsInTheFuture(includesToday: unknown, includeTime: unknown)
|
|||||||||||||||
|
Checks whether the date is in the future. Often used in combination with
Parameters :
Returns :
ValidatorFn
|
| validateDateIsInThePast | |||||||||||||||
validateDateIsInThePast(includesToday: unknown, includeTime: unknown)
|
|||||||||||||||
|
Checks whether the date is in the future.
Parameters :
Returns :
ValidatorFn
|
| validateStartDateIsBeforeEndDate | ||||||||||||||||||||
validateStartDateIsBeforeEndDate(startDateId: string, endDateId: string, allowSameDay: boolean)
|
||||||||||||||||||||
|
Checks if the start date is before the end date.
Parameters :
Returns :
ValidatorFn
Returns a function which in case of an error it returns |
| validateYearIsEqualOrGreater | ||||||||
validateYearIsEqualOrGreater(threshold: number)
|
||||||||
|
Checks if a date's year is greater than or equal the threshold's year.
Parameters :
Returns :
ValidatorFn
Returns a function which in case of an error it returns |