You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

files-from-path

Package Overview
Dependencies
Maintainers
3
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

files-from-path - npm Package Compare versions

Comparing version

to
1.1.5-rc.0

2

package.json
{
"name": "files-from-path",
"version": "1.1.4",
"version": "1.1.5-rc.0",
"description": "Expand paths to file-like objects with name, readable stream and size.",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -43,2 +43,3 @@ import gracefulfs from 'graceful-fs'

* @param {FileSystem} [options.fs] Custom FileSystem implementation.
* @param {(fullPath: string) => boolean} [options.filter] filter discovered files
* @returns {Promise<FileLike[]>}

@@ -87,2 +88,3 @@ */

* @param {FileSystem} [options.fs] Custom FileSystem implementation.
* @param {(fullPath: string) => boolean} [options.filter] filter discovered files
* @returns {AsyncIterableIterator<FileLike>}

@@ -98,3 +100,3 @@ */

if (!hidden && path.basename(filepath).startsWith('.')) return false
return true
return !options || !options.filter || options.filter(filepath)
}

@@ -101,0 +103,0 @@

@@ -7,2 +7,3 @@ /**

* @param {FileSystem} [options.fs] Custom FileSystem implementation.
* @param {(fullPath: string) => boolean} [options.filter] filter discovered files
* @returns {Promise<FileLike[]>}

@@ -14,2 +15,3 @@ */

fs?: FileSystem | undefined;
filter?: ((fullPath: string) => boolean) | undefined;
} | undefined): Promise<FileLike[]>;

@@ -16,0 +18,0 @@ export type FileLike = Pick<File, 'stream' | 'name' | 'size'>;

Sorry, the diff of this file is not supported yet