mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 10:15:07 +08:00
policy: replace entries with keys
Replaced the entries with keys since the values of the entries are not used, and changed loop style to avoid mangled `Symbol.iterator`s and to keep consistency. PR-URL: https://github.com/nodejs/node/pull/41482 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
6b9d2aefdb
commit
a1f827a859
1 file changed
+3
-1
@@ -130,7 +130,9 @@ class DependencyMapperInstance {
|
||||
this.#patternDependencies = undefined;
|
||||
} else {
|
||||
const patterns = [];
|
||||
for (const { 0: key } of ObjectEntries(dependencies)) {
|
||||
const keys = ObjectKeys(dependencies);
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
const key = keys[i];
|
||||
if (StringPrototypeEndsWith(key, '*')) {
|
||||
const target = RegExpPrototypeExec(/^([^*]*)\*([^*]*)$/);
|
||||
if (!target) {
|
||||
|
||||
Reference in new issue
Block a user