A-New-Day-001's picture
Upload 1591 files
be5030f
raw
history blame contribute delete
547 Bytes
'use strict'
class Section {
constructor () {
this.list = []
}
add (content) {
const chalkFormat = require('./chalk-format')
const arrayify = require('array-back')
arrayify(content).forEach(line => this.list.push(line))
}
emptyLine () {
this.list.push('')
}
header (text) {
const chalk = require('chalk')
if (text) {
this.add(chalk.underline.bold(text))
this.emptyLine()
}
}
toString () {
const os = require('os')
return this.list.join(os.EOL)
}
}
module.exports = Section