@rg-dev/stdlib
Advanced tools
+2
-2
@@ -362,4 +362,4 @@ var __create = Object.create; | ||
| } | ||
| function createTempFilePath() { | ||
| const name = `temp_file_${process.pid}_${Date.now()}_${Math.random().toString(36).slice(2)}`; | ||
| function createTempFilePath(ext) { | ||
| const name = `temp_file_${process.pid}_${Date.now()}_${Math.random().toString(36).slice(2)}${ext ? `.${ext}` : ""}`; | ||
| const fullPath = import_path.default.join(import_os.default.tmpdir(), name); | ||
@@ -366,0 +366,0 @@ return { |
@@ -34,3 +34,3 @@ import { Response } from 'express'; | ||
| declare function createTempDir(): string; | ||
| declare function createTempFilePath(): { | ||
| declare function createTempFilePath(ext?: string): { | ||
| getName: () => string; | ||
@@ -37,0 +37,0 @@ cleanUp: () => void; |
@@ -34,3 +34,3 @@ import { Response } from 'express'; | ||
| declare function createTempDir(): string; | ||
| declare function createTempFilePath(): { | ||
| declare function createTempFilePath(ext?: string): { | ||
| getName: () => string; | ||
@@ -37,0 +37,0 @@ cleanUp: () => void; |
+2
-2
@@ -349,4 +349,4 @@ var __create = Object.create; | ||
| } | ||
| function createTempFilePath() { | ||
| const name = `temp_file_${process.pid}_${Date.now()}_${Math.random().toString(36).slice(2)}`; | ||
| function createTempFilePath(ext) { | ||
| const name = `temp_file_${process.pid}_${Date.now()}_${Math.random().toString(36).slice(2)}${ext ? `.${ext}` : ""}`; | ||
| const fullPath = path.join(os.tmpdir(), name); | ||
@@ -353,0 +353,0 @@ return { |
+1
-1
| { | ||
| "name": "@rg-dev/stdlib", | ||
| "version": "1.0.37", | ||
| "version": "1.0.38", | ||
| "description": "", | ||
@@ -5,0 +5,0 @@ "scripts": { |
541366
0.01%