Namespace: Util

ProtoBuf. Util

ProtoBuf utilities.

Source:

Members

(static, constant) IS_NODE :boolean

Flag if running in node or not.

Type:
  • boolean
Source:

Methods

(static) fetch(path, callbackopt) → {string|undefined}

Fetches a resource.

Parameters:
Name Type Attributes Description
path string

Resource path

callback function <optional>

Callback receiving the resource's contents. If omitted the resource will be fetched synchronously. If the request failed, contents will be null.

Source:
Returns:

Resource contents if callback is omitted (null if the request failed), else undefined.

Type
string | undefined

(static) toCamelCase(str) → {string}

Converts a string to camel case.

Parameters:
Name Type Description
str string
Source:
Returns:
Type
string

(static) XHR() → {XMLHttpRequest}

Constructs a XMLHttpRequest object.

Source:
Throws:

If XMLHttpRequest is not supported

Type
Error
Returns:
Type
XMLHttpRequest