Commit a81a8c4
install: improve isOnly(Dev,Optional)
Instead of creating a new set each time a new node gets visited, so that
its siblings do not have it in `seen`, just remove the node from the
original set right after all child nodes are visited.
See #76
Credit: @larsgw
PR-URL: #206
Close: #206
Reviewed-by: @isaacs1 parent 8dfbe86 commit a81a8c4
2 files changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | 31 | | |
33 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
17 | | - | |
| 16 | + | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| 20 | + | |
| 21 | + | |
21 | 22 | | |
0 commit comments