         if el.nodeType is DOMElementType.NORMAL
             res.push slim el
         else if el.nodeType is DOMElementType.TEXT
-            if trim(el.value).length
+            if el.value.trim().length
                 res.push el.value
         else continue
     return res

    CDATA:    4
    FRAGMENT: 11

#{ trim, extend:merge } = require 'jquery'
##
# slice off spaces
trim = (str) ->
    str.replace /^\s+|\s+$/g, ""

##
# dom attributes to object


# exports

module.exports = { slim_attrs, slim, traverse, jsonify }

