code: function resolveFormatter(formatter) {
  	if (!formatter) return resolveFormatter('stylish');
  	if (typeof formatter === 'function') return formatter;
  	if (typeof formatter === 'string') {
  		if (isModuleAvailable(formatter)) return require(formatter);
  		if (isModuleAvailable(`./formatters/${formatter}`)) return require(`./formatters/${formatter}`);
  		throw wrapError(new Error(`Could not resolve formatter: ${formatter}`));
  	}
  }
docs: Resolves formatter.
  
  @param {string|function} formatter - formatter
  @returns {function} formatter function