Skip to content

Commit f4b8459

Browse files
committed
Fixup: Inline isDotfile
1 parent cdf6f5e commit f4b8459

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

lib/util.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ exports.FileFinder = class FileFinder {
1414
* @return {boolean}
1515
*/
1616
this._filter = filename => {
17-
if(skipDotfiles && isDotfile(filename)) {
17+
if(skipDotfiles && path.basename(filename).startsWith(".")) {
1818
return false;
1919
}
2020
return filter ? filter(filename) : true;
@@ -64,14 +64,4 @@ async function tree(filepath, referenceDir = filepath) {
6464
return entries.flat();
6565
}
6666

67-
/**
68-
* Does the filename start with a dot?
69-
*
70-
* @param {string} filename
71-
* @returns {boolean}
72-
*/
73-
function isDotfile(filename) {
74-
return path.basename(filename).startsWith(".");
75-
}
76-
7767
/** @import { FileFinderOptions } from "./types.ts" */

0 commit comments

Comments
 (0)