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

Function addEntries

packages/dev/s2-docs/scripts/generateAgentSkills.mjs:758–766  ·  view source on GitHub ↗
(entries, targetSubdir, stripPrefix = null)

Source from the content-addressed store, hash-verified

756 const destinationMap = new Map();
757
758 const addEntries = (entries, targetSubdir, stripPrefix = null) => {
759 for (const entry of entries) {
760 let targetRelPath = entry.path;
761 if (stripPrefix && targetRelPath.startsWith(stripPrefix)) {
762 targetRelPath = targetRelPath.slice(stripPrefix.length);
763 }
764 destinationMap.set(entry.path, path.posix.join(targetSubdir, targetRelPath));
765 }
766 };
767
768 addEntries(customGuideEntries, 'guides');
769 addEntries(categories.guides, 'guides');

Callers 1

buildDestinationMapFunction · 0.85

Calls 2

sliceMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected