Module

casting

This file contains a series of functionalities that allow type conversion.

View Source utils/casting.js, line 1

Methods

# static arrayToObject(arr, key, keyFunc)

Convert an array of objects to object of objects based on one key.

Parameters:
Name Type Description
arr array

Array of objects.

key string

The key to use as key.

keyFunc function

Function to use before the key is applied to the new object.

View Source utils/casting.js, line 15