MCPcopy Create free account
hub / github.com/nodejs/node / Unify

Function Unify

tools/gyp/pylib/gyp/input.py:1589–1592  ·  view source on GitHub ↗

Removes duplicate elements from items, keeping the first element.

(items)

Source from the content-addressed store, hash-verified

1587
1588
1589def Unify(items):
1590 """Removes duplicate elements from items, keeping the first element."""
1591 seen = {}
1592 return [seen.setdefault(e, e) for e in items if e not in seen]
1593
1594
1595def RemoveDuplicateDependencies(targets):

Callers 1

Calls 1

setdefaultMethod · 0.45

Tested by

no test coverage detected