code: function mapItems(data, fn) {
      return data instanceof Array ? data.map(function (item) { return fn(item); }) : fn(data);
  }
docs: 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