src/index.js
function buildInputsArray(rawInputsString) {
  let returnArray = []; // eslint-disable-line
  const rawMethodInputs = rawInputsString.split(',');

  // no inputs
  if (typeof rawMethodInputs === 'undefined' || rawMethodInputs.length === 0) {
    return [];
  }

  rawMethodInputs.forEach((rawMethodInput) => {
    const inputData = rawMethodInput.trim().split(' ');
    const type = inputData[0];
    const name = inputData[1] || '';

    // if type exists
    if (type !== '' && typeof type !== 'undefined') {
      returnArray.push({
        type,
        name,
      });
    }
  });

  return returnArray;
}
function buildInputsArray(rawInputsString) {
  let returnArray = []; // eslint-disable-line
  const rawMethodInputs = rawInputsString.split(',');

  // no inputs
  if (typeof rawMethodInputs === 'undefined' || rawMethodInputs.length === 0) {
    return [];
  }

  rawMethodInputs.forEach((rawMethodInput) => {
    const inputData = rawMethodInput.trim().split(' ');
    const type = inputData[0];
    const name = inputData[1] || '';

    // if type exists
    if (type !== '' && typeof type !== 'undefined') {
      returnArray.push({
        type,
        name,
      });
    }
  });

  return returnArray;
}
function buildInputsArray ( rawInputsString ) { let returnArray = [ ] ; // eslint-disable-line const rawMethodInputs = rawInputsString . split ( ',' ) ; // no inputs if ( typeof rawMethodInputs === 'undefined' || rawMethodInputs . length === 0 ) { return [ ] ; } rawMethodInputs . forEach ( ( rawMethodInput ) => { const inputData = rawMethodInput . trim ( ) . split ( ' ' ) ; const type = inputData [ 0 ] ; const name = inputData [ 1 ] || '' ; // if type exists if ( type !== '' && typeof type !== 'undefined' ) { returnArray . push ( { type , name , } ) ; } } ) ; return returnArray ; }
build inputs or outputs array from raw inputs string
build inputs or outputs array from raw inputs string