code: function srcEnv (documentize, stream) {
    return function (...args) {
      let src = Array.find(args, a => is.string(a) || is.array(a))
      let env = Array.find(args, is.plainObject)
  
      env = ensureEnvironment(env)
  
      env.logger.debug('process.argv:', () => JSON.stringify(process.argv))
      env.logger.debug('sassdoc version:', () => require('../package.json').version)
      env.logger.debug('node version:', () => process.version.substr(1))
  
      env.logger.debug('npm version:', () => {
        let prefix = path.resolve(process.execPath, '../../lib')
        let pkg = path.resolve(prefix, 'node_modules/npm/package.json')
  
        try {
          return require(pkg).version
        } catch (e) {
          return 'unknown'
        }
      })
  
      env.logger.debug('platform:', () => process.platform)
      env.logger.debug('cwd:', () => process.cwd())
  
      env.src = src
  
      env.logger.debug('env:', () => {
        let clone = {}
  
        difference(
          Object.getOwnPropertyNames(env),
          ['domain', '_events', '_maxListeners', 'logger']
        )
          .forEach(k => clone[k] = env[k])
  
        return JSON.stringify(clone, null, 2)
      })
  
      let task = env.src ? documentize : stream
      env.logger.debug('task:', () => env.src ? 'documentize' : 'stream')
  
      return task(env)
    }
  }
docs: Return a function taking optional `src` string or array, and optional
  `env` object (arguments are found by their type).
  
  If `src` is set, proxy to `documentize`, otherwise `stream`.
  
  Both functions will be passed the `env` object, which will have a
  `src` key.