base64ToRaw(value: string)
Requires:
@ray-js/panel-sdk≥1.0.0
Description
Convert a Base64-encoded string to a hexadecimal raw string
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
value | string | Yes | A Base64-encoded string |
Return Value
Type: string
The corresponding hexadecimal raw string, two characters per byte
Examples
Basic usage
rawToBase64(value: string)
Requires:
@ray-js/panel-sdk≥1.0.0
Description
Convert a hexadecimal raw string to a Base64-encoded string
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
value | string | Yes | A hexadecimal raw string whose length must be even |
Return Value
Type: any
The Base64-encoded string; returns an empty string if the input length is odd
Examples
Basic usage
hexToBinary(value: string)
Requires:
@ray-js/panel-sdk≥1.0.0
Description
Convert a hexadecimal string to a binary string
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
value | string | Yes | Hexadecimal string |
Return Value
Type: string
The corresponding binary string
Examples
Basic usage
generateDpStrStep(dpStr: string)
Requires:
@ray-js/panel-sdk≥1.0.0
Description
Create a step-wise parser for raw or string DPs
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
dpStr | string | Yes | The DP hexadecimal string to parse |
Return Value
Type: (num: number, type: "string" | "number") => __object
A step parser function; each call returns the next parsed segment as { value, done }
Valid Values
return.type
| Value | Description | Since |
|---|---|---|
string | - | - |
number | - | - |