Commit f2c9e5a
lib: introduce internal/validators
Create a file to centralize argument validators that are used in
multiple internal modules.
Move validateInt32 and validateUint32 to this file.
PR-URL: #21149
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>1 parent 7c0c61b commit f2c9e5aCopy full SHA for f2c9e5a
File tree
Expand file treeCollapse file tree
5 files changed
+76
-56
lines changedOpen diff view settings
Filter options
- lib
- internal
- fs
Expand file treeCollapse file tree
5 files changed
+76
-56
lines changedOpen diff view settings
Collapse file
+9-7Lines changed: 9 additions & 7 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
65 | 65 | |
66 | 66 | |
67 | 67 | |
68 | | - |
69 | 68 | |
70 | 69 | |
71 | 70 | |
| ||
76 | 75 | |
77 | 76 | |
78 | 77 | |
79 | | - |
80 | 78 | |
81 | 79 | |
82 | | - |
83 | | - |
| 80 | + |
84 | 81 | |
85 | 82 | |
86 | 83 | |
87 | 84 | |
88 | 85 | |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
89 | 91 | |
90 | 92 | |
91 | 93 | |
| ||
787 | 789 | |
788 | 790 | |
789 | 791 | |
790 | | - |
791 | | - |
| 792 | + |
| 793 | + |
792 | 794 | |
793 | 795 | |
794 | 796 | |
| ||
797 | 799 | |
798 | 800 | |
799 | 801 | |
800 | | - |
| 802 | + |
801 | 803 | |
802 | 804 | |
803 | 805 | |
|
Collapse file
lib/internal/fs/promises.js
Copy file name to clipboardExpand all lines: lib/internal/fs/promises.js+7-5Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
21 | 21 | |
22 | 22 | |
23 | 23 | |
24 | | - |
25 | 24 | |
26 | 25 | |
27 | 26 | |
28 | 27 | |
29 | 28 | |
30 | 29 | |
31 | 30 | |
32 | | - |
33 | 31 | |
34 | 32 | |
35 | | - |
36 | | - |
| 33 | + |
37 | 34 | |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
38 | 40 | |
39 | 41 | |
40 | 42 | |
| ||
263 | 265 | |
264 | 266 | |
265 | 267 | |
266 | | - |
| 268 | + |
267 | 269 | |
268 | 270 | |
269 | 271 | |
|
Collapse file
+1-44Lines changed: 1 addition & 44 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
70 | 70 | |
71 | 71 | |
72 | 72 | |
73 | | - |
74 | | - |
75 | | - |
76 | 73 | |
77 | 74 | |
78 | 75 | |
| ||
341 | 338 | |
342 | 339 | |
343 | 340 | |
344 | | - |
345 | | - |
346 | | - |
347 | | - |
348 | | - |
349 | | - |
350 | | - |
351 | | - |
352 | | - |
353 | | - |
354 | | - |
355 | | - |
356 | | - |
357 | | - |
358 | | - |
359 | | - |
360 | | - |
361 | | - |
362 | | - |
363 | | - |
364 | 341 | |
365 | 342 | |
366 | 343 | |
| ||
410 | 387 | |
411 | 388 | |
412 | 389 | |
413 | | - |
414 | | - |
415 | | - |
416 | | - |
417 | | - |
418 | | - |
419 | | - |
420 | | - |
421 | | - |
422 | | - |
423 | | - |
424 | | - |
425 | | - |
426 | | - |
427 | | - |
428 | | - |
429 | 390 | |
430 | 391 | |
431 | 392 | |
432 | 393 | |
433 | | - |
434 | | - |
435 | 394 | |
436 | 395 | |
437 | 396 | |
| ||
443 | 402 | |
444 | 403 | |
445 | 404 | |
446 | | - |
447 | 405 | |
448 | 406 | |
449 | | - |
450 | | - |
| 407 | + |
451 | 408 | |
Collapse file
lib/internal/validators.js
Copy file name to clipboard+58Lines changed: 58 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
Collapse file
+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
147 | 147 | |
148 | 148 | |
149 | 149 | |
| 150 | + |
150 | 151 | |
151 | 152 | |
152 | 153 | |
|
0 commit comments