let numberRE = /^\d+$/;

export default function findParams (startIndex, list) {

  let params = [];
  let insertIndex = 0;
  let value = '';

  function next (index) {
    let char = list[index];
    if (char && numberRE.test(char)) {
      value += char;
      list[index] = null;
      next(index + 1);
    }
    else if (char === '|') {
      const numericValue = value && numberRE.test(value) ? parseInt(value, 10) : value;
      params[insertIndex] = numericValue;
      insertIndex++;
      list[index] = null;
      value = '';
      next(index + 1);
    }
    else {
      const numericValue = value && numberRE.test(value) ? parseInt(value, 10) : value;
      params[insertIndex] = numericValue;
    }
  }

  next(startIndex);

  return params;
}

@@ -317,29 +317,11 @@
 else
- if (char === '%7C')
  %7B%0A
+
     
@@ -442,24 +442,53 @@
 mericValue;%0A
+%0A      if (char === '%7C') %7B%0A  
       insert
@@ -496,16 +496,18 @@
 ndex++;%0A
+  
       li
@@ -520,24 +520,26 @@
 ex%5D = null;%0A
+  
       value 
@@ -542,32 +542,34 @@
 lue = '';%0A      
+  
 next(index + 1);
@@ -577,150 +577,11 @@
     
-%7D%0A    else %7B%0A      const numericValue = value && numberRE.test(value) ? parseInt(value, 10) : value;%0A      params%5BinsertIndex%5D = numericValue;
+  %7D
 %0A   

simplify findParams method