pre convert array
161511
function(_data,_key,_map){
            if (_u._$isArray(_data)){
                _map[_key] = JSON.stringify(_data);
            }
        }
721671
function convertArrayCell (cell) {
  const {item} = cell
  const arrayOptions = _.chain(item)
  .pick(ARRAY_CELL_PROPERTIES)
  .assign({
    itemCell: convertCell(item)
  })
  .value()
  return {
    arrayOptions,
    model: cell.model
  }
}
693016
function reviveArray (array, reviver) {
  let revived = [];

  for (let i = 0; i < array.length; i++) {
    revived[i] = reviveValue(array, i + '', array[i], reviver);
  }

  return revived;
}
74907
def insert_before(self, value: Union[RawValue, Value],
                      raw: bool = False) -> "ArrayEntry":
        
        return ArrayEntry(self.index, self.before, self.after.cons(self.value),
                          self._cook_value(value, raw), self.parinst,
                          self.schema_node, datetime.now())
232293
public function convert($value)
	{
		if (is_array(($value))) {
			$retval = [];
			foreach ($value as $object) {
				$retval[] = $this->convert($object); // force sequential indexing
			}

			return $retval;
		} else if (is_object($value)) {
			return $this->convertObject($value);
		} else {
			return $value;
		}
	}
997055
function toArray() {
  const arr = [];
  for (let i = 0; i < this.length; i += 1) {
    arr.push(this[i]);
  }
  return arr;
}
289111
function procesArray(array) {
  if (!array || !Array.isArray(array)) {
    return array;
  }
  return array.map((item, index) => {
    if (typeof item === "string") {
      return localizeString(item);
    }
    return item;
  });
}
1151503
function arrayToString(array){
  var str = '';

  for (let i = 0; i < array.length; i++) {
    str += array[i];
  }

  return str;
}
443971
function subst(array &$old,$new) {
		if (is_string($new))
			$new=[$new];
		foreach ($new as $hdr) {
			$old=preg_grep('/'.preg_quote(strstr($hdr,':',TRUE),'/').':.+/',
				$old,PREG_GREP_INVERT);
			array_push($old,$hdr);
		}
	}
523009
public static function array_prepend( $array, $string, $deep = false )
    {
        if ( empty( $array ) || empty( $string ) )
        {
            return $array;
        }

        foreach ( $array as $key => $element )
        {
            if ( is_array( $element ) )
            {
                if ( $deep )
                {
                    $array[$key] = self::array_prepend( $element, $string, $deep );
                }
                else
                {
                    trigger_error( 'array_prepend: array element', E_USER_WARNING );
                }
            }
            else
            {
                $array[$key] = $string . $element;
            }
        }

        return $array;
    }
473194
private function convertHashToArrayOfBoolean()
    {
        $matches = str_split($this->hash, 1);
        foreach ($matches as $i => $match) {
            $index = (int) ($i / $this->block);
            $data = $this->convertHexaToBool($match);
            $items = [
                0 => [0, 2],
                1 => [1, 4],
                2 => [2, 6],
                3 => [3, 8],
            ];
            foreach ($items[$i % $this->block] as $item) {
                $this->arrayOfSquare[$index][$item] = $data;
            }

            ksort($this->arrayOfSquare[$index]);
        }
        preg_match_all('/(\d)[\w]/', $this->hash, $matches);
        $this->color = array_map(function ($data) {
            return hexdec($data) * 16;
        }, array_reverse($matches[1]));

        return $this;
    }
628317
private function prepareContent($postArray) {
		$returnArray = [];

		/**
		 * function used to concatenate two arrays key by key
		 * @param 	String		$item1		value from the first array
		 * @param 	String		$item2		value from the second array
		 * @return	String
		 */
		function combine($item1, $item2) {
			return $item1.$item2;
		}

		unset($postArray['_token']);

		foreach ($postArray as $key => $item) {
			$keys = explode('__', $key);

			if (is_array($item)) {
				if (isset($item['before'])) {
					$value = $this->sanitize(implode('|', array_map(function($item1, $item2) {return $item1.$item2;}, str_replace('|', '&#124;', $item['before']), str_replace('|', '&#124;',$item['after']))));
				} else {
					$value = $this->sanitize(implode('|', str_replace('|', '&#124;', $item['after'])));
				}
			} else {
				$value = $this->sanitize(str_replace('|', '&#124;',$item));
			}

			$this->setArrayValue($returnArray, $keys, $value);
		}

		return $returnArray;
	}
888349
public function toArray()
   {
      $proto = Converter::toArray($this);
      $not = array('primary_method', 'lastUpdate', 'subfunctions', 'client', 'path', 'hasPath');
      // we only need key value
      foreach ($proto as $k => $p) {
        if (in_array($k, $not)) {
          unset($proto[$k]);
        }
      }

      return $proto;
   }
398002
function convertPrefix(str) {
    var res = new Array(str.length);
    for (var i = 0; i < str.length; ++i)
        res[i] = str[i] === '1';
    return res;
}
1010653
function convertArray( array, numType ) {

	// Skip matching cases
	if ( ((array instanceof Uint8Array) && (numType === NUMTYPE.UINT8)) ||
		 ((array instanceof Int8Array) && (numType === NUMTYPE.INT8)) ||
		 ((array instanceof Uint16Array) && (numType === NUMTYPE.UINT16)) ||
		 ((array instanceof Int16Array) && (numType === NUMTYPE.INT16)) ||
		 ((array instanceof Uint32Array) && (numType === NUMTYPE.UINT32)) ||
		 ((array instanceof Int32Array) && (numType === NUMTYPE.INT32)) ||
		 ((array instanceof Float32Array) && (numType === NUMTYPE.FLOAT32)) ||
		 ((array instanceof Float64Array) && (numType === NUMTYPE.FLOAT64)) ) {

		// Return as-is
		return array;
	}

	// Convert
	return new NUMTYPE_CLASS[numType]( array );
}
720160
function (arr, pred) {
    for (var i = 0; i < arr.length; i++) {
      var value = arr[i];
      if (pred(value, i, arr)) {
        return value;
      }
    }
    return null;
  }
1227163
function toArray(id, time) {
  var o = [
    id,
    Math.round(this._now / 1000),
    time,
    this._cmd];
  return o;
}