mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-18 05:40:33 +03:00
15 lines
354 B
JavaScript
15 lines
354 B
JavaScript
/**
|
|
* Generates title output for the server
|
|
*
|
|
* @param {'title'} type - the string "title"
|
|
* @param {String} data - the title text
|
|
* @return {Object} - the title generator
|
|
*/
|
|
export default function titleGenerator({ attribute } = {}, type, data) {
|
|
return {
|
|
text() {
|
|
return `<${type} ${attribute}="true">${data}</${type}>`
|
|
}
|
|
}
|
|
}
|