   ###
   constructor: (fn) ->
     @_state = 'pending'
-    fn.call(this, this) if typeof fn == 'function'
+    fn.call(this, this) if typeof fn is 'function'
 
   ###
   Pass in functions or arrays of functions to be executed when the

  flatted = []
  args.forEach (item) ->
    if item
      if typeof item == 'function'
        flatted.push(item)
      else
        args.forEach (fn) ->
          if typeof fn == 'function'
            flatted.push(fn)
  flatted


      .done (doneArgs...) ->
        readyCount += 1
        allDoneArgs[index] = doneArgs
        if readyCount is args.length
          allReady.resolve(allDoneArgs...)
      .fail (failArgs...) ->
        allReady.rejectWith(this, failArgs...)
