Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function getPrettyStream (opts, prettifier, dest) {
if (prettifier && typeof prettifier === 'function') {
return prettifierMetaWrapper(prettifier(opts), dest)
}
try {
var prettyFactory = require('pino-pretty')
prettyFactory.asMetaWrapper = prettifierMetaWrapper
return prettifierMetaWrapper(prettyFactory(opts), dest)
} catch (e) {
throw Error('Missing `pino-pretty` module: `pino-pretty` must be installed separately')
}
}