'use strict'; const chalk = require("chalk"); const ansiStyles = require("ansi-styles"); const pad = require("pad"); function grayBackground(string) { return ansiStyles.bgColor.ansi256.rgb(33, 33, 33) + string + ansiStyles.bgColor.close; } module.exports = function sectionTag(sectionName, {isArray} = {isArray: false}) { let arrayPrefix; if (isArray) { arrayPrefix = chalk.red.bold("[]"); } else { arrayPrefix = " "; } return `${arrayPrefix} ${grayBackground(`${pad(10, sectionName)} ->`)}`; }