index.js
function findOneJsInArray(ary) {
  var found,
      count = 0;
  ary.forEach(function(entry) {
    if (jsExtRegExp.test(entry)) {
      count += 1;
      found = entry;
    }
  });

  return count === 1 ? found : null;
}
function findOneJsInArray(ary) {
  var found,
      count = 0;
  ary.forEach(function(entry) {
    if (jsExtRegExp.test(entry)) {
      count += 1;
      found = entry;
    }
  });

  return count === 1 ? found : null;
}
function findOneJsInArray ( ary ) { var found , count = 0 ; ary . forEach ( function ( entry ) { if ( jsExtRegExp . test ( entry ) ) { count += 1 ; found = entry ; } } ) ; return count === 1 ? found : null ; }
Given an array of file paths, only return a value if there is only one that ends in a .js extension.
Given an array of file paths only return a value if there is only one that ends in a . js extension .