 
   killRepeat:(id)-> clearInterval id
 
-  defer:do ->
+  defer:do (queue = []) ->
     # this was ported from browserify's implementation of "process.nextTick"
-    queue = []
     if window?.postMessage and window.addEventListener
       window.addEventListener "message", ((ev) ->
         if ev.source is window and ev.data is "kd-tick"

    arr = (str?.split(delim).map (part) -> do part.trim) ? []
    arr = arr.filter Boolean  if filterEmpty
    return arr

  objectToArray: (options)->
    for key, option of options
      option.title ?= key
      option.key    = key
      option

###
//     Underscore.js 1.3.1

      chain.push caller
    chain

  createCounter: createCounter = (i = 0) -> -> i++

  getUniqueId: do (inc = createCounter()) -> -> "kd-#{do inc}"

  getRandomNumber :(range=1e6, min=0)->
    res = Math.floor Math.random()*range+1
