(filePath:string)
| 60 | const FOUR_HUNDRED_MB = 400 * 1024 * 1024; |
| 61 | |
| 62 | function isLargeFile(filePath:string) { |
| 63 | try { |
| 64 | // Get file stats |
| 65 | const stats = statSync(filePath); |
| 66 | // Compare file size with limit |
| 67 | if(stats.size > MAX_SIZE_LIMIT){ |
| 68 | return true |
| 69 | } |
| 70 | |
| 71 | if (stats.size > FOUR_HUNDRED_MB && getTotalMemory() < FIVE_GB) { |
| 72 | return true; |
| 73 | } |
| 74 | |
| 75 | return false; |
| 76 | } catch (err) { |
| 77 | console.error(err); |
| 78 | return false; |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | function isEmpty(x: any) { |
| 83 | return ( |
no test coverage detected