Commit 4fe9916
dns: remove redundant code using common variable
`validFamilies` variable is defined 2 times, so remove
redundant code by defining `validFamilies` in util. Plus,
apply the same approach to `validDnsOrders` because it's
also used multiple times.
PR-URL: #57386
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>1 parent 323e3ac commit 4fe9916Copy full SHA for 4fe9916
File tree
Expand file treeCollapse file tree
3 files changed
+12
-6
lines changedOpen diff view settings
Filter options
- lib
- internal/dns
Expand file treeCollapse file tree
3 files changed
+12
-6
lines changedOpen diff view settings
Collapse file
+3-2Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
46 | 46 | |
47 | 47 | |
48 | 48 | |
| 49 | + |
| 50 | + |
49 | 51 | |
50 | 52 | |
51 | 53 | |
| ||
138 | 140 | |
139 | 141 | |
140 | 142 | |
141 | | - |
142 | 143 | |
143 | 144 | |
144 | 145 | |
| ||
192 | 193 | |
193 | 194 | |
194 | 195 | |
195 | | - |
| 196 | + |
196 | 197 | |
197 | 198 | |
198 | 199 | |
|
Collapse file
lib/internal/dns/promises.js
Copy file name to clipboardExpand all lines: lib/internal/dns/promises.js+3-2Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
16 | 16 | |
17 | 17 | |
18 | 18 | |
| 19 | + |
| 20 | + |
19 | 21 | |
20 | 22 | |
21 | 23 | |
| ||
179 | 181 | |
180 | 182 | |
181 | 183 | |
182 | | - |
183 | 184 | |
184 | 185 | |
185 | 186 | |
| ||
227 | 228 | |
228 | 229 | |
229 | 230 | |
230 | | - |
| 231 | + |
231 | 232 | |
232 | 233 | |
233 | 234 | |
|
Collapse file
+6-2Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
201 | 201 | |
202 | 202 | |
203 | 203 | |
| 204 | + |
| 205 | + |
204 | 206 | |
205 | 207 | |
206 | 208 | |
207 | 209 | |
208 | 210 | |
209 | 211 | |
210 | 212 | |
211 | | - |
| 213 | + |
212 | 214 | |
213 | 215 | |
214 | 216 | |
| ||
281 | 283 | |
282 | 284 | |
283 | 285 | |
284 | | - |
| 286 | + |
285 | 287 | |
286 | 288 | |
287 | 289 | |
| ||
356 | 358 | |
357 | 359 | |
358 | 360 | |
| 361 | + |
| 362 | + |
359 | 363 | |
0 commit comments