mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-16 15:45:13 +00:00
18 lines
356 B
JavaScript
18 lines
356 B
JavaScript
var mergeAtLevel = require('./mergeAtLevel');
|
|
|
|
/**
|
|
Edit title of an article
|
|
|
|
@param {Summary} summary
|
|
@param {String} level
|
|
@param {String} newTitle
|
|
@return {Summary}
|
|
*/
|
|
function editArticleTitle(summary, level, newTitle) {
|
|
return mergeAtLevel(summary, level, {
|
|
title: newTitle
|
|
});
|
|
}
|
|
|
|
module.exports = editArticleTitle;
|