dist/utils.js
function mapItems(data, fn) {
    return data instanceof Array ? data.map(function (item) { return fn(item); }) : fn(data);
}
function mapItems(data, fn) {
    return data instanceof Array ? data.map(function (item) { return fn(item); }) : fn(data);
}
function mapItems ( data , fn ) { return data instanceof Array ? data . map ( function ( item ) { return fn ( item ) ; } ) : fn ( data ) ; }
Iterate trough one item or array of items and call the defined function

@export
@template T
@param {(object|Array<object>)} data - Data which needs to be iterated
@param {Function} fn - Function that needs to be callse
@returns {(T|Array<T>)} - The result of iteration
Iterate trough one item or array of items and call the defined function