Skip to content

Commit e85032b

Browse files
committed
bug in readme example code
1 parent 6dcdd41 commit e85032b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,16 @@ const folderNamedModules = await glob('**/*.{ts,js}', {
118118
}
119119
})
120120

121-
// find all files edited in the last hour
121+
// find all files edited in the last hour, to do this, we ignore
122+
// all of them that are more than an hour old
122123
const newFiles = await glob('**', {
123124
// need stat so we have mtime
124125
stat: true,
125126
// only want the files, not the dirs
126127
nodir: true,
127128
ignore: {
128129
ignored: (p) => {
129-
return (new Date() - p.mtime) <= (60 * 60 * 1000)
130+
return (new Date() - p.mtime) > (60 * 60 * 1000)
130131
},
131132
// could add similar childrenIgnored here as well, but
132133
// directory mtime is inconsistent across platforms, so

0 commit comments

Comments
 (0)