ВОЙТИ

Global

Methods

base64_decode

base64_decode(data: String): Array

Evaluates to given data decoded via Base64 encoding

Parameters

  • data:

    String

    Data to decode

Returns

  • Return:

    Array

base64_encode

base64_encode(data: String|Array): String

Evaluates to given data encoded via Base64 encoding

Parameters

  • data:

    String|Array

    String or array of numbers to encode

Returns

  • Return:

    String

bytes2hex

bytes2hex(data: Array, toUpperCase: Boolean): String

Creates a hex string from given bytes array.

Parameters

  • data:

    Array

    Array of numbers to convert into a string

  • toUpperCase:

    Boolean

    If set to 'true', resulting string will have uppercase 'A-F' chars. Default is 'false'.

Returns

  • Return:

    String

bytes2str

bytes2str(data: Array, encoding: String): String

Given array of numbers create a string from them using specified encoding

Parameters

  • data:

    Array

    Array of numbers to create a string from

  • encoding:

    String

    Encoding to use for string creation, "utf-8" by default.

Returns

  • Return:

    String

clearInterval

clearInterval(intervalID: number): void

The clearInterval() method cancels a timed, repeating action which was previously established by a call to setInterval().

Parameters

  • intervalID:

    number

    The identifier of the repeated action you want to cancel. This ID was returned by the corresponding call to setInterval().

Returns

  • Return:

    void

clearTimeout

clearTimeout(timeoutID: number): void

The clearTimeout() method cancels a timeout previously established by calling setTimeout().

Parameters

  • timeoutID:

    number

    The identifier of the timeout you want to cancel. This ID was returned by the corresponding call to setTimeout().

Returns

  • Return:

    void

hex2bytes

hex2bytes(data: String): Array

Creates an array of numbers from parsing a hex string

Parameters

  • data:

    String

    Hex string like "cafec0de"

Returns

  • Return:

    Array

setInterval

setInterval(function: Function, delay: number): number

The setInterval() method repeatedly calls a function or executes a code snippet, with a fixed time delay between each call.

Parameters

  • function:

    Function

    A function to be executed every delay milliseconds. The function is not passed any parameters, and no return value is expected.

  • delay:

    number

    The time, in milliseconds (thousandths of a second), the timer should delay in between executions of the specified function or code. If this parameter is less than 10, a value of 10 is used. Note that the actual delay may be longer.

Returns

  • Return:

    number

setTimeout

setTimeout(function: Function, delay: number): number

The setTimeout() method sets a timer which executes a function or specified piece of code once after the timer expires.

Parameters

  • function:

    Function

    A function to be executed after the timer expires.

  • delay:

    number

    The time, in milliseconds (thousandths of a second), the timer should wait before the specified function or code is executed. If this parameter is omitted, a value of 0 is used, meaning execute "immediately", or more accurately, as soon as possible. Note that in either case, the actual delay may be longer than intended

Returns

  • Return:

    number

str2bytes

str2bytes(data: String, encoding: String): Array

Creates an array of numbers from parsing string in specified codepage

Parameters

  • data:

    String

    String to parse

  • encoding:

    String

    String encoding, "utf-8" by default.

Returns

  • Return:

    Array

uuidgen

uuidgen(): String

Generates unique identifier and returns it's string representation

Returns

  • Return:

    String