@rg-dev/stdlib 1.0.39 → 1.0.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/node-env.cjs CHANGED
@@ -360,8 +360,12 @@ function createTempDir() {
360
360
  return tempDirPath;
361
361
  }
362
362
  function createTempFilePath(ext) {
363
- if (ext.startsWith(".")) {
364
- ext = ext.slice(1);
363
+ if (typeof ext == "string") {
364
+ if (ext.startsWith(".")) {
365
+ ext = ext.slice(1);
366
+ }
367
+ } else {
368
+ ext = void 0;
365
369
  }
366
370
  const name = `temp_file_${process.pid}_${Date.now()}_${Math.random().toString(36).slice(2)}${ext ? `.${ext}` : ""}`;
367
371
  const fullPath = import_path.default.join(import_os.default.tmpdir(), name);
package/lib/node-env.js CHANGED
@@ -347,8 +347,12 @@ function createTempDir() {
347
347
  return tempDirPath;
348
348
  }
349
349
  function createTempFilePath(ext) {
350
- if (ext.startsWith(".")) {
351
- ext = ext.slice(1);
350
+ if (typeof ext == "string") {
351
+ if (ext.startsWith(".")) {
352
+ ext = ext.slice(1);
353
+ }
354
+ } else {
355
+ ext = void 0;
352
356
  }
353
357
  const name = `temp_file_${process.pid}_${Date.now()}_${Math.random().toString(36).slice(2)}${ext ? `.${ext}` : ""}`;
354
358
  const fullPath = path.join(os.tmpdir(), name);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rg-dev/stdlib",
3
- "version": "1.0.39",
3
+ "version": "1.0.40",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",