Util
Utility class contains some helper static methods.
Static Member Summary
Static Public Members | ||
public static get |
|
|
public static get |
|
|
public static get |
|
Static Method Summary
Static Public Methods | ||
public static |
createCloseEvent(code: number, reason: string, wasClean: boolean): CloseEvent | NodeCloseEvent Create |
|
public static |
Check execution environment. |
|
public static |
isSocket(channel: WebSocket | RTCDataChannel): boolean Check whether the channel is a socket. |
|
public static |
Check whether the string is a valid URL. |
|
public static |
require(module: *): * |
|
public static |
requireLib(libConst: *): * |
Static Public Members
Static Public Methods
public static createCloseEvent(code: number, reason: string, wasClean: boolean): CloseEvent | NodeCloseEvent source
Create CloseEvent
.
Return:
CloseEvent | NodeCloseEvent |
public static isSocket(channel: WebSocket | RTCDataChannel): boolean source
Check whether the channel is a socket.
Params:
Name | Type | Attribute | Description |
channel | WebSocket | RTCDataChannel |
public static isURL(str: string): type source
Check whether the string is a valid URL.
Params:
Name | Type | Attribute | Description |
str | string |
Return:
type | Description |
public static requireLib(libConst: *): * source
Params:
Name | Type | Attribute | Description |
libConst | * |
Return:
* |