filelist-utils
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -7,3 +7,3 @@ import { FileCollectionItem } from '../FileCollectionItem'; | ||
*/ | ||
ignoreDotFiles?: boolean; | ||
ignoreDotfiles?: boolean; | ||
}; | ||
@@ -10,0 +10,0 @@ /** |
@@ -8,5 +8,6 @@ /** | ||
export async function maybeFilter(fileCollectionItems, options = {}) { | ||
const { ignoreDotFiles = true } = options; | ||
if (ignoreDotFiles) { | ||
fileCollectionItems = fileCollectionItems.filter((item) => !item.name.startsWith('.')); | ||
const { ignoreDotfiles = true } = options; | ||
if (ignoreDotfiles) { | ||
fileCollectionItems = fileCollectionItems.filter((item) => item.relativePath.split('/').filter((part) => part.startsWith('.')) | ||
.length === 0); | ||
} | ||
@@ -13,0 +14,0 @@ return fileCollectionItems; |
@@ -7,3 +7,3 @@ import { FileCollectionItem } from '../FileCollectionItem'; | ||
*/ | ||
ignoreDotFiles?: boolean; | ||
ignoreDotfiles?: boolean; | ||
}; | ||
@@ -10,0 +10,0 @@ /** |
@@ -11,5 +11,6 @@ "use strict"; | ||
async function maybeFilter(fileCollectionItems, options = {}) { | ||
const { ignoreDotFiles = true } = options; | ||
if (ignoreDotFiles) { | ||
fileCollectionItems = fileCollectionItems.filter((item) => !item.name.startsWith('.')); | ||
const { ignoreDotfiles = true } = options; | ||
if (ignoreDotfiles) { | ||
fileCollectionItems = fileCollectionItems.filter((item) => item.relativePath.split('/').filter((part) => part.startsWith('.')) | ||
.length === 0); | ||
} | ||
@@ -16,0 +17,0 @@ return fileCollectionItems; |
{ | ||
"name": "filelist-utils", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Create a FileCollection from a path or a zip file", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -8,3 +8,3 @@ import { FileCollectionItem } from '../FileCollectionItem'; | ||
*/ | ||
ignoreDotFiles?: boolean; | ||
ignoreDotfiles?: boolean; | ||
}; | ||
@@ -22,6 +22,8 @@ | ||
): Promise<FileCollectionItem[]> { | ||
const { ignoreDotFiles = true } = options; | ||
if (ignoreDotFiles) { | ||
const { ignoreDotfiles = true } = options; | ||
if (ignoreDotfiles) { | ||
fileCollectionItems = fileCollectionItems.filter( | ||
(item) => !item.name.startsWith('.'), | ||
(item) => | ||
item.relativePath.split('/').filter((part) => part.startsWith('.')) | ||
.length === 0, | ||
); | ||
@@ -28,0 +30,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
122929
1915