code: function transformArray(array, keys, i, options) {
      if (options) {
        var t = {__index__: i};
        t[options.value] = array[i];
  
        if (options.key) {
          t[options.key] = i;
        }
  
        return t;
      } else {
        return array[i];
      }
    }
docs: Helper function for working with foreach loops data. Will transform data for "key, value of array" constructions.