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

Function dirToTitle

packages/dev/docs/src/Layout.js:171–177  ·  view source on GitHub ↗
(dir)

Source from the content-addressed store, hash-verified

169};
170
171function dirToTitle(dir) {
172 return dir
173 .split('/')[0]
174 .split('-')
175 .map(w => w.charAt(0).toUpperCase() + w.slice(1))
176 .join(' ');
177}
178
179function stripMarkdown(description) {
180 return (description || '').replace(/\[(.*?)\]\(.*?\)/g, '$1');

Callers 1

Layout.jsFile · 0.85

Calls 1

sliceMethod · 0.80

Tested by

no test coverage detected