namirasoft-core
Advanced tools
Comparing version 1.3.8 to 1.3.9
export declare class FileOperation { | ||
static findUp(fileName: string): string[]; | ||
static foreach(base: string, handler: (base: string, sub: string, name: string, full: string, isFolder: boolean) => Promise<boolean | void>, folders?: boolean, files?: boolean): Promise<void>; | ||
static foreach(base: string, handler: (base: string, sub: string, name: string, full: string, isFolder: boolean) => Promise<boolean>, folders?: boolean, files?: boolean): Promise<void>; | ||
} |
@@ -48,7 +48,6 @@ "use strict"; | ||
if (folders) { | ||
let stop = yield handler(base, sub, name, full, true); | ||
if (stop) | ||
let moveon = yield handler(base, sub, name, full, true); | ||
if (!moveon) | ||
continue; | ||
} | ||
; | ||
yield recursive(base, newSub); | ||
@@ -55,0 +54,0 @@ } |
@@ -11,3 +11,3 @@ { | ||
"private": false, | ||
"version": "1.3.8", | ||
"version": "1.3.9", | ||
"main": "./dist/index.js", | ||
@@ -14,0 +14,0 @@ "types": "./dist/index.d.ts", |
@@ -30,3 +30,3 @@ let fs: any; | ||
} | ||
static async foreach(base: string, handler: (base: string, sub: string, name: string, full: string, isFolder: boolean) => Promise<boolean | void>, folders: boolean = true, files: boolean = true) | ||
static async foreach(base: string, handler: (base: string, sub: string, name: string, full: string, isFolder: boolean) => Promise<boolean>, folders: boolean = true, files: boolean = true) | ||
{ | ||
@@ -44,6 +44,6 @@ async function recursive(base: string, sub: string) | ||
{ | ||
let stop = await handler(base, sub, name, full, true); | ||
if (stop) | ||
let moveon = await handler(base, sub, name, full, true); | ||
if (!moveon) | ||
continue; | ||
}; | ||
} | ||
await recursive(base, newSub); | ||
@@ -50,0 +50,0 @@ } |
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
300276
3651