Module

order

This file contains a series of functionalities related to sorting objects.

View Source utils/order.js, line 1

Methods

# static orderByDateTime(arr, keyopt) → {Array.<object>}

Order array of elements by a timestamp attribute.

Parameters:
Name Type Attributes Default Description
arr Array.<object>

Array of objects to sort.

key string <optional>
'eventdate'

Key of the eventdate attribute.

View Source utils/order.js, line 34

  • Sorted array.
Array.<object>

# static rankingByFloat(arr, key, value, num) → {Array}

Get a ranking given a specfic configuration.

Parameters:
Name Type Description
arr Array.<object>

Array of objects to rank.

key string

The name of the object key to rank.

value string

The name of the object key with the value.

num number

The number of elements for the ranking.

View Source utils/order.js, line 16

  • Array of objects with the key and value sorted.
Array