     super event, listener
 
   run: (options, done) ->
-    if options? then @_configure options, done
+    if arguments.length > 0 then @_configure options, done
     unless @target? then throw new Error 'dirator requires a `target` to run'
     if @async then @_iterate [new Path @target] else @_iterateSync()
 

corepath   = require 'path'
Path       = require 'fspath'

class Dirator extends (require 'events').EventEmitter
  constructor: (options, done) -> @_configure options, done

  _configure: (options = {}, done) ->

#  1. Dirator = require('dirator').Dirator
#  2. dirator = require('dirator')
#     dirator options
#  3. require('dirator')(options)
module.exports = (args...) -> new Dirator(args...).run()
module.exports.Dirator = Dirator
for type in ['files', 'dirs', 'paths']
