Ever wanted to wrap your node.js console output in some visual chrome? This function automates it for you! It indents your text by one space, and centres the chrome above and below. Even for multiline strings the chrome length will be properly calculated using ninja disco rocket boots (or Math.max.apply on the array if the rocket boots are on loan). As a bonus, the third parameter takes a character to put at the start of your string, like an arrow or something.
/**
* Wrap a sting with visual chrome above and below. Automatic length.
*
* @param {String} basic A basic string to wrap. No whitespace padding needed.
* @param {String} chromeChar A character to use for the chrome.