monkberry.js
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];
    }
  }
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];
    }
  }
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 ] ; } }
Helper function for working with foreach loops data. Will transform data for "key, value of array" constructions.
Helper function for working with foreach loops data . Will transform data for key value of array constructions .