You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
348 B
JavaScript
14 lines
348 B
JavaScript
'use strict';
|
|
|
|
let readmeFilenames = [
|
|
"readme.md",
|
|
"readme.rst",
|
|
"readme",
|
|
"read me"
|
|
]
|
|
|
|
module.exports = function(filenames) {
|
|
/* We invert the search here, so that we prioritize by the order of entries
|
|
* in readmeFilenames, rather than the filenames passed in. */
|
|
return readmeFilenames.find((filename) => inArray(filenames, filename));
|
|
} |