@svizzle/utils/object-any

Methods

(static) getId(object) → {*}

Source:
Since:
  • 0.4.0

Retrieve the 'id' property of the provided object.

Example
> getId({id: 'foo', name: 'bar'})
'foo'
Parameters:
Name Type Description
object object
Returns:
  • object.id
Type
*

(static) getKey(object) → {*}

Source:
Since:
  • 0.4.0

Retrieve the 'key' property of the provided object.

Example
> getKey({key: 'foo', value: 'bar'})
'foo'
Parameters:
Name Type Description
object object
Returns:
  • object.key
Type
*

(static) getValue(object) → {*}

Source:
Since:
  • 0.4.0

Retrieve the 'value' property of the provided object.

Example
> getValue({key: 'foo', value: 'bar'})
'bar'
Parameters:
Name Type Description
object object
Returns:
  • object.value
Type
*

(static) getValues(object) → {*}

Source:
Since:
  • 0.4.0

Retrieve the 'values' property of the provided object.

Example
> getValues({key: 'foo', values: [0, 1, 2, 3]})
[0, 1, 2, 3]
Parameters:
Name Type Description
object object
Returns:
  • object.values
Type
*