crash-js 0.1.124 → 0.1.126

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/crash-js/fs-utils +22 -67
  2. package/package.json +2 -2
package/crash-js/fs-utils CHANGED
@@ -150,19 +150,26 @@ function
150
150
 
151
151
  function
152
152
  _file_read(
153
- _path) {
154
- let
155
- _read_opts,
156
- _return;
157
- _read_opts =
158
- {"encoding":
159
- "utf8",
160
- "flag":
161
- 'r'};
162
- _return =
163
- _fs_read_file_sync(
164
- _path,
165
- _read_opts);
153
+ _path,
154
+ _read_opts) {
155
+ const
156
+ _read_opts_type =
157
+ typeof(
158
+ _read_opts);
159
+ if ( _read_opts_type === "undefined" ||
160
+ _read_opts == {} ||
161
+ _read_opts == "" ) {
162
+ _read_opts =
163
+ {"encoding":
164
+ "utf8",
165
+ "flag":
166
+ 'r'};
167
+ }
168
+ const
169
+ _return =
170
+ _fs_read_file_sync(
171
+ _path,
172
+ _read_opts);
166
173
  return _return;
167
174
  }
168
175
 
@@ -212,32 +219,6 @@ function
212
219
  return _return;
213
220
  }
214
221
 
215
- function
216
- _mv(
217
- _args) {
218
- let
219
- _rename,
220
- _return;
221
- if ( typeof(
222
- _fs.renameSync) === 'undefined' ) {
223
- _rename =
224
- _fs.moveSync;
225
- _return =
226
- _rename.apply(
227
- null,
228
- _args).unwrap()
229
- }
230
- else {
231
- _rename =
232
- _fs.renameSync;
233
- _return =
234
- _rename.apply(
235
- null,
236
- _args);
237
- }
238
- return _return;
239
- }
240
-
241
222
  function
242
223
  _path_join(
243
224
  _paths) {
@@ -250,32 +231,6 @@ function
250
231
  return _path;
251
232
  }
252
233
 
253
- function
254
- _rm(
255
- _args) {
256
- let
257
- _rm,
258
- _return;
259
- if ( typeof(
260
- _fs.rmSync) === 'undefined' ) {
261
- _rm =
262
- _fs.removeSync;
263
- _return =
264
- _rm.apply(
265
- null,
266
- _args).unwrap()
267
- }
268
- else {
269
- _rm =
270
- _fs.rmSync;
271
- _return =
272
- _rm.apply(
273
- null,
274
- _args);
275
- }
276
- return _return;
277
- }
278
-
279
234
  async function
280
235
  _mktemp(
281
236
  _prefix,
@@ -362,11 +317,11 @@ module.exports = {
362
317
  _mktemp:
363
318
  _mktemp,
364
319
  _mv:
365
- _mv,
320
+ _fs_module.renameSync,
366
321
  _path_join:
367
322
  _path_join,
368
323
  _rm:
369
- _rm,
324
+ _fs_module.rmSync,
370
325
  _stat:
371
326
  _stat
372
327
  };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name":
3
3
  "crash-js",
4
4
  "version":
5
- "0.1.124",
5
+ "0.1.126",
6
6
  "description":
7
7
  "Crash Javascript library.",
8
8
  "funding":
@@ -62,7 +62,7 @@
62
62
  },
63
63
  "devDependencies": {
64
64
  "crash-js-webpack":
65
- "^0.0.17",
65
+ "^0.0.19",
66
66
  "eslint":
67
67
  "^10.3.0",
68
68
  "globals":