A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/nodejs/node/commit/8086337ea9 below:

remove unnecessary option argument validation · nodejs/node@8086337 · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+9

-8

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+9

-8

lines changed Original file line number Diff line number Diff line change

@@ -1349,19 +1349,20 @@ function mkdirSync(path, options) {

1349 1349

let mode = 0o777;

1350 1350

let recursive = false;

1351 1351

if (typeof options === 'number' || typeof options === 'string') {

1352 -

mode = options;

1352 +

mode = parseFileMode(options, 'mode');

1353 1353

} else if (options) {

1354 -

if (options.recursive !== undefined)

1354 +

if (options.recursive !== undefined) {

1355 1355

recursive = options.recursive;

1356 -

if (options.mode !== undefined)

1357 -

mode = options.mode;

1356 +

validateBoolean(recursive, 'options.recursive');

1357 +

}

1358 +

if (options.mode !== undefined) {

1359 +

mode = parseFileMode(options.mode, 'options.mode');

1360 +

}

1358 1361

}

1359 -

path = getValidatedPath(path);

1360 -

validateBoolean(recursive, 'options.recursive');

1361 1362 1362 1363

const result = binding.mkdir(

1363 -

path,

1364 -

parseFileMode(mode, 'mode'),

1364 +

getValidatedPath(path),

1365 +

mode,

1365 1366

recursive,

1366 1367

);

1367 1368

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4