Index

src/app/_helpers/array-sum.ts

arraySum
arraySum(arr)

Returns the sum of all values in an array.

Parameters :
Name Optional Description
arr No
  • An array of numbers.
Example :
Prints 6 for the array [1, 2, 3]:</p>
<pre><code class="language-typescript">console.log(arraySum([1, 2, 3]));
</code></pre>
Returns : number

The sum of all values in the array.

src/app/_helpers/to-hex.ts

asciiToHex
asciiToHex(str)
Parameters :
Name Optional
str No
Returns : string

src/app/_helpers/online-status.ts

checkOnlineStatus
checkOnlineStatus()
Returns : Promise<boolean>

src/app/_helpers/clipboard-copy.ts

copyToClipboard
copyToClipboard(text)

Copies set text to clipboard.

Parameters :
Name Optional Description
text No
  • The text to be copied to the clipboard.
Example :
copies &#39;Hello World!&#39; to the clipboard and prints &quot;true&quot;:</p>
<pre><code class="language-typescript">console.log(copyToClipboard(&#39;Hello World!&#39;));
</code></pre>
Returns : boolean

true - If the copy operation is successful.

src/app/_helpers/export-csv.ts

exportCsv
exportCsv(arrayData, filename, delimiter)

Exports data to a CSV format and provides a download file.

Parameters :
Name Optional Description
arrayData No
  • An array of data to be converted to CSV format.
filename No
  • The name of the file to be downloaded.
delimiter No
  • The delimiter to be used when converting to CSV format. Defaults to commas.
Returns : void

src/app/_workers/fetch-accounts.worker.ts

getAccountByAddress
getAccountByAddress(accountAddress, metaUrl, token)
Parameters :
Name Optional
accountAddress No
metaUrl No
token No
Returns : Promise<any>

src/app/_helpers/http-getter.ts

HttpGetter
HttpGetter()

Provides an avenue of fetching resources via HTTP calls.

Returns : void

src/app/_helpers/read-csv.ts

parseData
parseData(data)

Parses data to CSV format.

Parameters :
Name Optional Description
data No
  • The data to be parsed.
Returns : Array<any>

An array of the parsed data.

readCsv
readCsv(input)

Reads a csv file and converts it to an array.

Parameters :
Name Optional Description
input No
  • The file to be read.
Returns : Array | void

An array of the read data.

src/app/_helpers/schema-validation.ts

personValidation
personValidation(person)

Validates a person object against the defined Person schema.

Parameters :
Name Optional Description
person No
  • A person object to be validated.
Returns : Promise<void>
vcardValidation
vcardValidation(vcard)

Validates a vcard object against the defined Vcard schema.

Parameters :
Name Optional Description
vcard No
  • A vcard object to be validated.
Returns : Promise<void>

src/app/_helpers/global-error-handler.ts

rejectBody
rejectBody(error)
Parameters :
Name Optional
error No
Returns : literal type

src/app/_helpers/sync.ts

updateSyncable
updateSyncable(changes, changesDescription, syncable)
Parameters :
Name Optional
changes No
changesDescription No
syncable No
Returns : any

result-matching ""

    No results matching ""