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