lib/build.js
function generatePathString(paths) {
  let pathString = '';

  if (!paths || !paths.length) return pathString;

  if (paths.length > 1) {
    pathString = paths.map(pathItem => filepathName(pathItem));
    // Trim long lists
    if (pathString.length > maxInputStringLength) {
      const remainder = pathString.length - maxInputStringLength;

      pathString = `${pathString
        .slice(0, maxInputStringLength)
        .join(', ')} ...and ${remainder} other${remainder > 1 ? 's' : ''}`;
    } else {
      pathString = pathString.join(', ');
    }
  } else {
    pathString = filepathName(paths[0]);
  }

  return pathString;
}
function generatePathString(paths) {
  let pathString = '';

  if (!paths || !paths.length) return pathString;

  if (paths.length > 1) {
    pathString = paths.map(pathItem => filepathName(pathItem));
    // Trim long lists
    if (pathString.length > maxInputStringLength) {
      const remainder = pathString.length - maxInputStringLength;

      pathString = `${pathString
        .slice(0, maxInputStringLength)
        .join(', ')} ...and ${remainder} other${remainder > 1 ? 's' : ''}`;
    } else {
      pathString = pathString.join(', ');
    }
  } else {
    pathString = filepathName(paths[0]);
  }

  return pathString;
}
function generatePathString ( paths ) { let pathString = '' ; if ( ! paths || ! paths . length ) return pathString ; if ( paths . length > 1 ) { pathString = paths . map ( pathItem => filepathName ( pathItem ) ) ; // Trim long lists if ( pathString . length > maxInputStringLength ) { const remainder = pathString . length - maxInputStringLength ; pathString = ` ${ pathString . slice ( 0 , maxInputStringLength ) . join ( ', ' ) } ${ remainder } ${ remainder > 1 ? 's' : '' } ` ; } else { pathString = pathString . join ( ', ' ) ; } } else { pathString = filepathName ( paths [ 0 ] ) ; } return pathString ; }
Generate path string for 'paths'
@param {Array} paths
@returns {String}
Generate path string for paths