const 
  _     = require('lodash'),
  ass   = require('chai').assert

const defaultOptions = {
  iterations: 100,
  path: require('path'),
  fs:   require('fs-extra'),
}


module.exports = parseOptions

function parseOptions( opt, isSync ) {
  if ( 'string' == typeof opt ) {
    opt = {
      format: opt
    }
  }

  _.defaults( 
    opt, 
    {
      dir: process.cwd(),
    }, 
    defaults,
    defaultOptions
  )

  opt = _.clone(opt)

  return opt
}

function resolvePathlib( pathlib ) {
  if ( !pathlib )
    pathlib = require('path')

  if ( 'string' == typeof pathlib ) {
    pathlib = {
      'win32': require('path').win32,
      'posix': require('path').posix
    }[pathlib]
  }

  var needFunction = ['parse','format','resolve']

  ass.isFunction( pathlib.parse )
  ass.isFunction( pathlib.format )
  ass.isFunction( pathlib.resolve )
  


}

@@ -1,14 +1,13 @@
 const
- 
 %0A  _    
@@ -322,17 +322,16 @@
 efaults(
- 
 %0A    opt
@@ -331,17 +331,16 @@
     opt,
- 
 %0A    %7B%0A 
@@ -374,13 +374,15 @@
   %7D,
- 
 %0A   
+ //
  def
@@ -841,15 +841,13 @@
 solve )%0A
-  
 %0A%0A%0A%7D%0A

Make tests pass