mkdir-async-recursive
Advanced tools
+3
-3
@@ -20,3 +20,3 @@ 'use strict'; | ||
| function parseFileMode(value, name, def) { | ||
| value ?? (value = def); | ||
| value ??= def; | ||
| if (typeof value === "string") { | ||
@@ -37,3 +37,3 @@ if (!/^[0-7]+$/.test(value)) { | ||
| } else if (options) { | ||
| if (options.mode !== void 0) { | ||
| if (options.mode !== undefined) { | ||
| mode = parseFileMode(options.mode, "options.mode"); | ||
@@ -60,5 +60,5 @@ } | ||
| } | ||
| return result.length ? node_path.resolve(result[0]) : void 0; | ||
| return result.length ? node_path.resolve(result[0]) : undefined; | ||
| } | ||
| module.exports = mkdirRecursive; |
+1
-1
@@ -6,2 +6,2 @@ import { MakeDirectoryOptions } from 'node:fs'; | ||
| export { mkdirRecursive as default }; | ||
| export = mkdirRecursive; |
+3
-3
@@ -18,3 +18,3 @@ import { existsSync, mkdirSync } from 'node:fs'; | ||
| function parseFileMode(value, name, def) { | ||
| value ?? (value = def); | ||
| value ??= def; | ||
| if (typeof value === "string") { | ||
@@ -35,3 +35,3 @@ if (!/^[0-7]+$/.test(value)) { | ||
| } else if (options) { | ||
| if (options.mode !== void 0) { | ||
| if (options.mode !== undefined) { | ||
| mode = parseFileMode(options.mode, "options.mode"); | ||
@@ -58,5 +58,5 @@ } | ||
| } | ||
| return result.length ? resolve(result[0]) : void 0; | ||
| return result.length ? resolve(result[0]) : undefined; | ||
| } | ||
| export { mkdirRecursive as default }; |
+4
-4
| { | ||
| "name": "mkdir-async-recursive", | ||
| "version": "1.0.2", | ||
| "version": "1.0.3", | ||
| "description": "Asynchronously and recursively creates a directory. Returns undefined or the first directory path created.", | ||
@@ -51,6 +51,6 @@ "type": "module", | ||
| "devDependencies": { | ||
| "@types/node": "^22.10.1", | ||
| "@types/node": "^22.10.6", | ||
| "prettier": "^3.4.2", | ||
| "typescript": "^5.7.2", | ||
| "unbuild": "^2.0.0" | ||
| "typescript": "^5.7.3", | ||
| "unbuild": "^3.3.1" | ||
| }, | ||
@@ -57,0 +57,0 @@ "publishConfig": { |
6985
-0.27%