mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-16 02:44:51 +00:00
6 lines
271 B
JavaScript
6 lines
271 B
JavaScript
import { splitByCase, upperFirst } from 'scule'
|
|
|
|
export default (title, link) => {
|
|
return title || (link.startsWith('http') && link) || link.split('/').filter(Boolean).map(part => splitByCase(part).map(p => upperFirst(p)).join(' ')).join(' > ').replace('Api', 'API')
|
|
}
|