MCPcopy Create free account
hub / github.com/adobe/react-spectrum / pushUnique

Function pushUnique

packages/dev/mcp/s2/scripts/build-data.mjs:194–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192 const seen = new Set();
193
194 const pushUnique = items => {
195 for (const v of items) {
196 const s = String(v);
197 if (!seen.has(s)) {
198 seen.add(s);
199 values.push(s);
200 }
201 }
202 };
203
204 // Expand 'baseColors' placeholder into actual color token names.
205 const expandedBase = [];

Callers 1

Calls 4

StringFunction · 0.85
pushMethod · 0.80
hasMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected