SharedHelperUtil
Extends:
Constructor Summary
| Public Constructor | ||
| public |
|
|
Member Summary
| Public Members | ||
| public |
MAX_NAME_LENGTH: number |
|
| public get |
utilName: * |
|
| Private Members | ||
| private |
|
|
Method Summary
| Public Methods | ||
| public |
capitalizeFirstLetter(string: *): * |
|
| public |
cleanJson(obj: *): * |
|
| public |
copy(aObject: *): * |
|
| public |
endl(str: *): * |
|
| public |
formatDate(date: *, format: undefined): * |
|
| public |
generateRandomId(): * |
|
| public |
generateShortId(longId: *, creationTimestamp: *): * |
|
| public |
generateUUID(): * |
|
| public |
getFileNamesRecursive(baseDir: *, fileName: undefined, dir: undefined): * |
|
| public |
getFilesRecursive(baseDir: *, fileName: undefined, dir: undefined): * |
|
| public |
getLogEntry(key: *, text: *, date: undefined): {"created": *, "key": *, "text": *} |
|
| public |
getPaginationInfo(items: *[], limit: number, offset: number, fullCount: undefined): {"count": *, "offset": *, "limit": *, "pages": *, "currentPage": *, "itemsOnPage": *, "nextPage": *, "prevPage": *} |
|
| public |
isNumeric(n: *): * |
|
| public |
leven(first: *, second: *): * |
|
| public |
removeTrailingSpaces(input: *): * |
|
| public |
sanitizeUsername(name: *): * |
|
| public |
shuffle(array: Array): * Shuffles an array, returns the same array with shuffles elements |
|
| public |
sortAndReduce(arr: *): * |
|
| public |
uniqueArray(arr: *): * |
|
| Private Methods | ||
| private |
_shortIdBase(num: *, base: *): * |
|
Public Constructors
public constructor() source
Public Members
public MAX_NAME_LENGTH: number source
public get utilName: * source
Private Members
private _validShortIdChars: * source
Public Methods
public capitalizeFirstLetter(string: *): * source
Params:
| Name | Type | Attribute | Description |
| string | * |
Return:
| * |
public formatDate(date: *, format: undefined): * source
Params:
| Name | Type | Attribute | Description |
| date | * | ||
| format | undefined |
|
Return:
| * |
public generateShortId(longId: *, creationTimestamp: *): * source
Params:
| Name | Type | Attribute | Description |
| longId | * | ||
| creationTimestamp | * |
Return:
| * |
public getFileNamesRecursive(baseDir: *, fileName: undefined, dir: undefined): * source
Params:
| Name | Type | Attribute | Description |
| baseDir | * | ||
| fileName | undefined |
|
|
| dir | undefined |
|
Return:
| * |
public getFilesRecursive(baseDir: *, fileName: undefined, dir: undefined): * source
Params:
| Name | Type | Attribute | Description |
| baseDir | * | ||
| fileName | undefined |
|
|
| dir | undefined |
|
Return:
| * |
public getLogEntry(key: *, text: *, date: undefined): {"created": *, "key": *, "text": *} source
Params:
| Name | Type | Attribute | Description |
| key | * | ||
| text | * | ||
| date | undefined |
|
Return:
| {"created": *, "key": *, "text": *} |
public getPaginationInfo(items: *[], limit: number, offset: number, fullCount: undefined): {"count": *, "offset": *, "limit": *, "pages": *, "currentPage": *, "itemsOnPage": *, "nextPage": *, "prevPage": *} source
Params:
| Name | Type | Attribute | Description |
| items | *[] |
|
|
| limit | number |
|
|
| offset | number |
|
|
| fullCount | undefined |
|
Return:
| {"count": *, "offset": *, "limit": *, "pages": *, "currentPage": *, "itemsOnPage": *, "nextPage": *, "prevPage": *} |
public leven(first: *, second: *): * source
Params:
| Name | Type | Attribute | Description |
| first | * | ||
| second | * |
Return:
| * |
public removeTrailingSpaces(input: *): * source
Params:
| Name | Type | Attribute | Description |
| input | * |
Return:
| * |
public shuffle(array: Array): * source
Shuffles an array, returns the same array with shuffles elements
Params:
| Name | Type | Attribute | Description |
| array | Array |
Return:
| * |
Private Methods
private _shortIdBase(num: *, base: *): * source
Params:
| Name | Type | Attribute | Description |
| num | * | ||
| base | * |
Return:
| * |