MCPcopy Create free account
hub / github.com/yarnpkg/yarn / getAllInfoForPatterns

Method getAllInfoForPatterns

src/package-resolver.js:242–257  ·  view source on GitHub ↗

* Retrieve all the package info stored for a list of patterns.

(patterns: string[])

Source from the content-addressed store, hash-verified

240 */
241
242 getAllInfoForPatterns(patterns: string[]): Array<Manifest> {
243 const infos = [];
244 const seen = new Set();
245
246 for (const pattern of patterns) {
247 const info = this.patterns[pattern];
248 if (seen.has(info)) {
249 continue;
250 }
251
252 seen.add(info);
253 infos.push(info);
254 }
255
256 return infos;
257 }
258
259 /**
260 * Get a flat list of all package info.

Callers 2

optimizeResolutionsMethod · 0.95

Calls 2

pushMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected