Skip to content

Commit 605b0d0

Browse files
committed
refactor: rename the include boolean to isIncluded
1 parent e10092d commit 605b0d0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/index.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,15 @@ const NextMarkdown = (config: Config) => {
3535
const allFilesWithInclude = await Promise.all(
3636
allFiles.map(async (e) => ({
3737
...e,
38-
include: await includeToApply(e),
38+
isIncluded: await includeToApply(e),
3939
})),
4040
);
41+
4142
if (config.debug) {
4243
consoleLogNextmd('getStaticPaths:', JSON.stringify(allFilesWithInclude));
4344
}
44-
const files = allFilesWithInclude.filter((e) => e.include);
45+
46+
const files = allFilesWithInclude.filter((e) => e.isIncluded);
4547

4648
return {
4749
paths: files.map((e) => ({
@@ -77,8 +79,8 @@ const NextMarkdown = (config: Config) => {
7779
.filter((e) => JSON.stringify(nextmd) === JSON.stringify(absoluteToRelative(parse(e.path).dir).split('/'))); // get files in the same directory
7880

7981
const filesWanted = (
80-
await Promise.all(filesInSameDir.map(async (e) => ({ ...e, include: await includeToApply(e) })))
81-
).filter((e) => e.include);
82+
await Promise.all(filesInSameDir.map(async (e) => ({ ...e, isIncluded: await includeToApply(e) })))
83+
).filter((e) => e.isIncluded);
8284

8385
const filesData = await Promise.all(
8486
filesWanted.map(async (e) => ({

0 commit comments

Comments
 (0)