function _moveUpDown (arr, index, direction) {
      var copy = arr.slice();
      var toIdx = (direction === 'up') ? index - 1 : index + 1;
      copy.splice(toIdx, 0, copy.splice(index, 1)[0]);
      return copy;
   }
// move an item up/down in an array
move an item up/down in an array
move an item up / down in an array
function _moveUpDown (arr, index, direction) {
      var copy = arr.slice();
      var toIdx = (direction === 'up') ? index - 1 : index + 1;
      copy.splice(toIdx, 0, copy.splice(index, 1)[0]);
      return copy;
   }
function _moveUpDown ( arr , index , direction ) { var copy = arr . slice ( ) ; var toIdx = ( direction === 'up' ) ? index - 1 : index + 1 ; copy . splice ( toIdx , 0 , copy . splice ( index , 1 ) [ 0 ] ) ; return copy ; }
move an item up/down in an array
move an item up / down in an array