Namespace: helpers

apy. helpers

Groups all utilities functions

Classes

GeoPoint
MediaFile
StateHolder

Members


<static, readonly> $TYPES :string

Enum for Apy component known types

Type:
  • string
Properties:
Name Type Default Description
LIST string list
DICT string dict
POLY string poly
MEDIA string media
POINT string point
FLOAT string float
NESTED string nested
NUMBER string number
STRING string string
BOOLEAN string boolean
INTEGER string integer
EMBEDDED string embedded
OBJECTID string objectid
DATETIME string datetime
RESOURCE string resource
COLLECTION string collection

Methods


<static> fieldClassByType(type)

Get any known Field Class by its type

Parameters:
Name Type Description
type string

Field type

Throws:

If type is not found

Type
apy.errors.Error
Returns:

Any Field Class matching type or null

Type
* | null

<static> isBlob(value)

Determines if a reference is a Blob Object.

Parameters:
Name Type Description
value *

Reference to check.

Returns:
Type
boolean

<static> isDate(value)

Determines if a value is a date.

Parameters:
Name Type Description
value *

Reference to check.

Returns:

True if value is a Date.

Type
boolean

<static> isFile(value)

Determines if a reference is a File Object.

Parameters:
Name Type Description
value *

Reference to check.

Returns:
Type
boolean

<static> isFloat(value)

Determines if a reference is a Float.

Parameters:
Name Type Description
value string | number

value Reference to check.

Returns:

True if value is a Float.

Type
boolean

<static> isFunction(value)

Determines if a reference is a Function.

Parameters:
Name Type Description
value *

Reference to check.

Returns:

True if value is a Function.

Type
boolean

<static> isNegativeZero(number)

Determines if a number is a Negative Zero.

Parameters:
Name Type Description
number number

value Reference to check.

Returns:

True if value is a Negative Zero.

Type
boolean

<static> isObject(value)

Determines if a reference is an Object. Unlike typeof in JavaScript, nulls are not considered to be objects. Note that JavaScript arrays are objects.

Parameters:
Name Type Description
value *

Reference to check.

Returns:

True if value is an Object but not null.

Type
boolean

<static> isString(value)

Determines if a reference is a String.

Parameters:
Name Type Description
value *

Reference to check.

Returns:

True if value is a String.

Type
boolean

<static> patchArray()

Add to Array type, method

isArray

<static> patchObject()

Add to Object type, method

assign(target) (Object copy)

<static> patchString()

Add to String type, methods

capitalize()
replaceAll(target, replacement)

<inner> _getFieldClassByType()

Common behaviour

Returns:

Any Field Class matching type or null

Type
* | null