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