all files / commonform-docx/templates/ title.js

100% Statements 6/6
100% Branches 2/2
100% Functions 1/1
100% Lines 6/6
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15                  
var paragraph = require('./paragraph')
 
module.exports = function (string, center) {
  var argument = {
    alignment: 'left',
    depth: 1,
    title: true,
    content: [{title: string}]
  }
  if (center) {
    argument.alignment = 'center'
  }
  return paragraph(argument)
}