index.js
function formatLinesWith (formatter, str) {
  return str
    .split('\n')
    .map(function (line) {
      return line.length ? formatter(line) : ''
    })
    .join('\n')
}
function formatLinesWith (formatter, str) {
  return str
    .split('\n')
    .map(function (line) {
      return line.length ? formatter(line) : ''
    })
    .join('\n')
}
function formatLinesWith ( formatter , str ) { return str . split ( '\n' ) . map ( function ( line ) { return line . length ? formatter ( line ) : '' } ) . join ( '\n' ) }
Run a transformation function over the lines within a string and return the
result.

@param {function} formatter Formatter function
@param {string} str String to format
@return {string}
Run a transformation function over the lines within a string and return the result .