     toString(input).replace(/\n/g, "<br />\n")
 
   # To be accurate, we might need to escape special chars in the string
-  # 
+  #
   # References:
   # - http://stackoverflow.com/a/1144788/179691
   replace: (input, string, replacement = "") ->

    toString(input).replace HTML_ESCAPE_ONCE_REGEXP, HTML_ESCAPE

  # References:
  # - http://www.sitepoint.com/forums/showthread.php?218218-Javascript-Regex-making-Dot-match-new-lines 
  strip_html: (input) ->
    toString(input)
      .replace(/<script[\s\S]*?<\/script>/g, "")


  map: (input, property) ->
    toArray(input).map (e) ->
      if property?
        e[property]
      else
        e
