@themartiancompany/fs 0.0.12 → 0.0.13

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.
Files changed (2) hide show
  1. package/fs +32 -4
  2. package/package.json +4 -2
package/fs CHANGED
@@ -119,10 +119,6 @@ function
119
119
  return _fs;
120
120
  }
121
121
 
122
- const
123
- _fs =
124
- _fs_module_auto_detect();
125
-
126
122
  function
127
123
  _fs_worker_start_get(
128
124
  _fs_module) {
@@ -143,6 +139,38 @@ function
143
139
  return _fs_worker_start_fun;
144
140
  }
145
141
 
142
+ function
143
+ _is_dir_sync_get(
144
+ _fs_module,
145
+ _path) {
146
+ const
147
+ _is_dir_sync =
148
+ function(
149
+ _path) {
150
+ const
151
+ _file_info =
152
+ _fs_module.statSync(
153
+ _path);
154
+ const
155
+ _is_dir =
156
+ ! _file_info.isFile();
157
+ return _is_dir;
158
+ }
159
+ return _is_dir_sync;
160
+ }
161
+
162
+ const
163
+ _fs =
164
+ _fs_module_auto_detect();
165
+
166
+ _fs[
167
+ "isDirSync"] =
168
+ _is_dir_sync_get();
169
+ _fs[
170
+ "isDir"] =
171
+ _fs[
172
+ "isDirSync"];
173
+
146
174
  module.exports =
147
175
  _fs;
148
176
  module.exports.getModule =
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "description":
5
5
  "Platform-independent File System ('fs') module.",
6
6
  "version":
7
- "0.0.12",
7
+ "0.0.13",
8
8
  "homepage":
9
9
  "https://github.com/themartiancompany/tmcfs",
10
10
  "license":
@@ -73,7 +73,9 @@
73
73
  "@eslint/js":
74
74
  "^10.0.1",
75
75
  "eslint":
76
- "^10.3.0"
76
+ "^10.3.0",
77
+ "globals":
78
+ "^17.3.0"
77
79
  },
78
80
  "dependencies": {
79
81
  },