filelist-utils
Advanced tools
Comparing version 1.0.1 to 1.1.0
import { ExpandOptions } from './ExpandOptions'; | ||
import { FileCollection } from './FileCollection'; | ||
import { FilterOptions } from './utilities/maybeFilter'; | ||
/** | ||
@@ -13,3 +14,3 @@ * Generate a FileCollection from a FileList | ||
*/ | ||
export declare function fileCollectionFromFileList(fileList: FileList, options?: ExpandOptions): Promise<FileCollection>; | ||
export declare function fileCollectionFromFileList(fileList: FileList, options?: ExpandOptions & FilterOptions): Promise<FileCollection>; | ||
//# sourceMappingURL=fileCollectionFromFileList.d.ts.map |
import { FileCollection } from './FileCollection'; | ||
import { maybeExpand } from './utilities/maybeExpand'; | ||
import { maybeFilter } from './utilities/maybeFilter'; | ||
/** | ||
@@ -27,4 +28,5 @@ * Generate a FileCollection from a FileList | ||
fileCollectionItems = await maybeExpand(fileCollectionItems, options); | ||
fileCollectionItems = await maybeFilter(fileCollectionItems, options); | ||
return new FileCollection(fileCollectionItems); | ||
} | ||
//# sourceMappingURL=fileCollectionFromFileList.js.map |
import { ExpandOptions } from './ExpandOptions'; | ||
import { FileCollection } from './FileCollection'; | ||
import { FilterOptions } from './utilities/maybeFilter'; | ||
/** | ||
@@ -11,3 +12,3 @@ * Generate a FileCollection from an array of File | ||
*/ | ||
export declare function fileCollectionFromFiles(files: File[], options?: ExpandOptions): Promise<FileCollection>; | ||
export declare function fileCollectionFromFiles(files: File[], options?: ExpandOptions & FilterOptions): Promise<FileCollection>; | ||
//# sourceMappingURL=fileCollectionFromFiles.d.ts.map |
import { FileCollection } from './FileCollection'; | ||
import { maybeExpand } from './utilities/maybeExpand'; | ||
import { maybeFilter } from './utilities/maybeFilter'; | ||
/** | ||
@@ -26,4 +27,5 @@ * Generate a FileCollection from an array of File | ||
fileCollectionItems = await maybeExpand(fileCollectionItems, options); | ||
fileCollectionItems = await maybeFilter(fileCollectionItems, options); | ||
return new FileCollection(fileCollectionItems); | ||
} | ||
//# sourceMappingURL=fileCollectionFromFiles.js.map |
import { ExpandOptions } from './ExpandOptions'; | ||
import { FileCollection } from './FileCollection'; | ||
import { FilterOptions } from './utilities/maybeFilter'; | ||
/** | ||
@@ -9,3 +10,3 @@ * Generate a FileCollection from a directory path | ||
*/ | ||
export declare function fileCollectionFromPath(path: string, options?: ExpandOptions): Promise<FileCollection>; | ||
export declare function fileCollectionFromPath(path: string, options?: ExpandOptions & FilterOptions): Promise<FileCollection>; | ||
//# sourceMappingURL=fileCollectionFromPath.d.ts.map |
@@ -7,2 +7,3 @@ import { createReadStream } from 'node:fs'; | ||
import { maybeExpand } from './utilities/maybeExpand'; | ||
import { maybeFilter } from './utilities/maybeFilter'; | ||
/** | ||
@@ -20,2 +21,3 @@ * Generate a FileCollection from a directory path | ||
fileCollectionItems = await maybeExpand(fileCollectionItems, options); | ||
fileCollectionItems = await maybeFilter(fileCollectionItems, options); | ||
return new FileCollection(fileCollectionItems); | ||
@@ -22,0 +24,0 @@ } |
import { ExpandOptions } from './ExpandOptions'; | ||
import { FileCollection } from './FileCollection'; | ||
import { FilterOptions } from './utilities/maybeFilter'; | ||
/** | ||
@@ -14,3 +15,3 @@ * Creates a FileCollection from a webservice. This webservice should return an array of objects containing the properties: | ||
*/ | ||
export declare function fileCollectionFromWebservice(url: string | URL, options?: ExpandOptions): Promise<FileCollection>; | ||
export declare function fileCollectionFromWebservice(url: string | URL, options?: ExpandOptions & FilterOptions): Promise<FileCollection>; | ||
//# sourceMappingURL=fileCollectionFromWebservice.d.ts.map |
import fetch from 'cross-fetch'; | ||
import { FileCollection } from './FileCollection'; | ||
import { maybeExpand } from './utilities/maybeExpand'; | ||
import { maybeFilter } from './utilities/maybeFilter'; | ||
/** | ||
@@ -53,4 +54,5 @@ * Creates a FileCollection from a webservice. This webservice should return an array of objects containing the properties: | ||
fileCollectionItems = await maybeExpand(fileCollectionItems, options); | ||
fileCollectionItems = await maybeFilter(fileCollectionItems, options); | ||
return new FileCollection(fileCollectionItems); | ||
} | ||
//# sourceMappingURL=fileCollectionFromWebservice.js.map |
import { ExpandOptions } from './ExpandOptions'; | ||
import { FileCollection } from './FileCollection'; | ||
import { FilterOptions } from './utilities/maybeFilter'; | ||
/** | ||
@@ -13,3 +14,3 @@ * Generate a FileCollection from a FileList | ||
*/ | ||
export declare function fileCollectionFromFileList(fileList: FileList, options?: ExpandOptions): Promise<FileCollection>; | ||
export declare function fileCollectionFromFileList(fileList: FileList, options?: ExpandOptions & FilterOptions): Promise<FileCollection>; | ||
//# sourceMappingURL=fileCollectionFromFileList.d.ts.map |
@@ -6,2 +6,3 @@ "use strict"; | ||
const maybeExpand_1 = require("./utilities/maybeExpand"); | ||
const maybeFilter_1 = require("./utilities/maybeFilter"); | ||
/** | ||
@@ -31,2 +32,3 @@ * Generate a FileCollection from a FileList | ||
fileCollectionItems = await (0, maybeExpand_1.maybeExpand)(fileCollectionItems, options); | ||
fileCollectionItems = await (0, maybeFilter_1.maybeFilter)(fileCollectionItems, options); | ||
return new FileCollection_1.FileCollection(fileCollectionItems); | ||
@@ -33,0 +35,0 @@ } |
import { ExpandOptions } from './ExpandOptions'; | ||
import { FileCollection } from './FileCollection'; | ||
import { FilterOptions } from './utilities/maybeFilter'; | ||
/** | ||
@@ -11,3 +12,3 @@ * Generate a FileCollection from an array of File | ||
*/ | ||
export declare function fileCollectionFromFiles(files: File[], options?: ExpandOptions): Promise<FileCollection>; | ||
export declare function fileCollectionFromFiles(files: File[], options?: ExpandOptions & FilterOptions): Promise<FileCollection>; | ||
//# sourceMappingURL=fileCollectionFromFiles.d.ts.map |
@@ -6,2 +6,3 @@ "use strict"; | ||
const maybeExpand_1 = require("./utilities/maybeExpand"); | ||
const maybeFilter_1 = require("./utilities/maybeFilter"); | ||
/** | ||
@@ -30,2 +31,3 @@ * Generate a FileCollection from an array of File | ||
fileCollectionItems = await (0, maybeExpand_1.maybeExpand)(fileCollectionItems, options); | ||
fileCollectionItems = await (0, maybeFilter_1.maybeFilter)(fileCollectionItems, options); | ||
return new FileCollection_1.FileCollection(fileCollectionItems); | ||
@@ -32,0 +34,0 @@ } |
import { ExpandOptions } from './ExpandOptions'; | ||
import { FileCollection } from './FileCollection'; | ||
import { FilterOptions } from './utilities/maybeFilter'; | ||
/** | ||
@@ -9,3 +10,3 @@ * Generate a FileCollection from a directory path | ||
*/ | ||
export declare function fileCollectionFromPath(path: string, options?: ExpandOptions): Promise<FileCollection>; | ||
export declare function fileCollectionFromPath(path: string, options?: ExpandOptions & FilterOptions): Promise<FileCollection>; | ||
//# sourceMappingURL=fileCollectionFromPath.d.ts.map |
@@ -10,2 +10,3 @@ "use strict"; | ||
const maybeExpand_1 = require("./utilities/maybeExpand"); | ||
const maybeFilter_1 = require("./utilities/maybeFilter"); | ||
/** | ||
@@ -23,2 +24,3 @@ * Generate a FileCollection from a directory path | ||
fileCollectionItems = await (0, maybeExpand_1.maybeExpand)(fileCollectionItems, options); | ||
fileCollectionItems = await (0, maybeFilter_1.maybeFilter)(fileCollectionItems, options); | ||
return new FileCollection_1.FileCollection(fileCollectionItems); | ||
@@ -25,0 +27,0 @@ } |
import { ExpandOptions } from './ExpandOptions'; | ||
import { FileCollection } from './FileCollection'; | ||
import { FilterOptions } from './utilities/maybeFilter'; | ||
/** | ||
@@ -14,3 +15,3 @@ * Creates a FileCollection from a webservice. This webservice should return an array of objects containing the properties: | ||
*/ | ||
export declare function fileCollectionFromWebservice(url: string | URL, options?: ExpandOptions): Promise<FileCollection>; | ||
export declare function fileCollectionFromWebservice(url: string | URL, options?: ExpandOptions & FilterOptions): Promise<FileCollection>; | ||
//# sourceMappingURL=fileCollectionFromWebservice.d.ts.map |
@@ -10,2 +10,3 @@ "use strict"; | ||
const maybeExpand_1 = require("./utilities/maybeExpand"); | ||
const maybeFilter_1 = require("./utilities/maybeFilter"); | ||
/** | ||
@@ -60,2 +61,3 @@ * Creates a FileCollection from a webservice. This webservice should return an array of objects containing the properties: | ||
fileCollectionItems = await (0, maybeExpand_1.maybeExpand)(fileCollectionItems, options); | ||
fileCollectionItems = await (0, maybeFilter_1.maybeFilter)(fileCollectionItems, options); | ||
return new FileCollection_1.FileCollection(fileCollectionItems); | ||
@@ -62,0 +64,0 @@ } |
{ | ||
"name": "filelist-utils", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "Create a FileCollection from a path or a zip file", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -5,2 +5,3 @@ import { ExpandOptions } from './ExpandOptions'; | ||
import { maybeExpand } from './utilities/maybeExpand'; | ||
import { FilterOptions, maybeFilter } from './utilities/maybeFilter'; | ||
@@ -19,3 +20,3 @@ /** | ||
fileList: FileList, | ||
options: ExpandOptions = {}, | ||
options: ExpandOptions & FilterOptions = {}, | ||
): Promise<FileCollection> { | ||
@@ -37,4 +38,5 @@ let fileCollectionItems: FileCollectionItem[] = []; | ||
fileCollectionItems = await maybeExpand(fileCollectionItems, options); | ||
fileCollectionItems = await maybeFilter(fileCollectionItems, options); | ||
return new FileCollection(fileCollectionItems); | ||
} |
@@ -5,2 +5,3 @@ import { ExpandOptions } from './ExpandOptions'; | ||
import { maybeExpand } from './utilities/maybeExpand'; | ||
import { FilterOptions, maybeFilter } from './utilities/maybeFilter'; | ||
@@ -17,3 +18,3 @@ /** | ||
files: File[], | ||
options: ExpandOptions = {}, | ||
options: ExpandOptions & FilterOptions = {}, | ||
): Promise<FileCollection> { | ||
@@ -36,4 +37,5 @@ let fileCollectionItems: FileCollectionItem[] = []; | ||
fileCollectionItems = await maybeExpand(fileCollectionItems, options); | ||
fileCollectionItems = await maybeFilter(fileCollectionItems, options); | ||
return new FileCollection(fileCollectionItems); | ||
} |
@@ -10,2 +10,3 @@ import { createReadStream } from 'node:fs'; | ||
import { maybeExpand } from './utilities/maybeExpand'; | ||
import { FilterOptions, maybeFilter } from './utilities/maybeFilter'; | ||
@@ -20,3 +21,3 @@ /** | ||
path: string, | ||
options: ExpandOptions = {}, | ||
options: ExpandOptions & FilterOptions = {}, | ||
): Promise<FileCollection> { | ||
@@ -28,2 +29,3 @@ path = resolve(path); | ||
fileCollectionItems = await maybeExpand(fileCollectionItems, options); | ||
fileCollectionItems = await maybeFilter(fileCollectionItems, options); | ||
return new FileCollection(fileCollectionItems); | ||
@@ -30,0 +32,0 @@ } |
@@ -7,2 +7,3 @@ import fetch from 'cross-fetch'; | ||
import { maybeExpand } from './utilities/maybeExpand'; | ||
import { FilterOptions, maybeFilter } from './utilities/maybeFilter'; | ||
@@ -22,3 +23,3 @@ /** | ||
url: string | URL, | ||
options: ExpandOptions = {}, | ||
options: ExpandOptions & FilterOptions = {}, | ||
): Promise<FileCollection> { | ||
@@ -62,3 +63,4 @@ const response = await fetch(url.toString()); | ||
fileCollectionItems = await maybeExpand(fileCollectionItems, options); | ||
fileCollectionItems = await maybeFilter(fileCollectionItems, options); | ||
return new FileCollection(fileCollectionItems); | ||
} |
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
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
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
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
122540
156
1911