48
return undefined;
49
}
51
>
for (const entry of entries) {
52
>
if (typeof entry === 'string') {
53
if (isUnsafeMarketplaceKey(entry)) {
54
continue;
55
}
56
obj[entry] = entry;
58
>
if (isUnsafeMarketplaceKey(entry.name)) {
59
continue;
60
}
62
>
const base = s.source === 'github' ? s.repo : s.url;
63
>
obj[entry.name] = s.ref ? `${base}#${s.ref}` : base;
64
>
}
65
>
}
66
>
return obj;
67
>
}
68
69
/** Whether a marketplace name would pollute the prototype chain if used as an object key. */
71
>
return key === '__proto__' || key === 'constructor' || key === 'prototype';
72
>
}