Skip to content

Object

Type module

Sources

Items from Object can be imported/included and used via following ways.

/**
* Import via main package
* Access items like: am5.object.myVariable
*/
import * as am5 from "@amcharts/amcharts5";
/**
* Import via: Object.ts
* Access items like: $object.myVariable
*/
import * as $object from "@amcharts/amcharts5/Object";

Variables

Object does not have any variables.

Functions

copy(array: ArrayLike)

Returns Array

Returns a shallow copy of the object.

Returns a copy of the Date object.

Returns a copy of the Date object.

each(array: ArrayLike,
fn: (value: A, index: number) => void
)

Returns void

Iterates through all properties of the object calling f for each of them.

eachContinue(array: ArrayLike,
fn: (value: A, index: number) => boolean
)

Returns void

Iterates through all properties of the object calling fn for each of them.

If return value of the function evaluates to false further iteration is cancelled.

eachOrdered(object: Object,
fn: (key: Key, value: Object[""]) => void,
ord: (a: Keyof, b: Keyof) => number
)

Returns void

Orders object properties using custom ord function and iterates through them calling fn for each of them.

entries(object: O)

Returns Array

Returns an array of object's own enumerable [key, value] pairs.

hasKey(object: Object,
key: Key
)

Returns boolean

Checks if object has a specific key.

keys(object: O)

Returns Array

Returns an array of object's own enumerable property names.

keysOrdered(object: Object,
order: (a: Keyof, b: Keyof) => number
)

Returns Array

Returns an array of object's property names ordered using specific ordering function.

softCopyProperties(source: Object,
target: Object
)

Returns Object

Copies each property of source that is not null or undefined to target, where target has no value for it yet.