 
   getYearOptions  : (min = 1900,max = Date::getFullYear())->
     ({ title : "#{i}", value : i} for i in [min..max])
-  
+
   getFileExtension: (path) ->
     fileName = path or ''
     [name, extension...]  = fileName.split '.'
     extension = if extension.length is 0 then '' else extension[extension.length-1]
-    
+
   getFileType: (extension)->
 
     fileType = "unknown"


  expandUsernames: (text) ->
    return null unless text
    text.replace /[@]+[A-Za-z0-9-_]+/g, (u) ->
      username = u.replace "@", ""
      u.link "#!/member/#{username}"


      hashParams[d e[1] ] = d e[2]

    hashParams

  capAndRemovePeriods:(path)->
    newPath = for arg in path.split "."
      arg.capitalize()
    newPath.join ""

  slugify:(title = "")->
    url = title
      .toLowerCase()                # change everything to lowercase
      .replace(/^\s+|\s+$/g, "")    # trim leading and trailing spaces
      .replace(/[_|\s]+/g, "-")     # change all spaces and underscores to a hyphen
      .replace(/[^a-z0-9-]+/g, "")  # remove all non-alphanumeric characters except the hyphen
      .replace(/[-]+/g, "-")        # replace multiple instances of the hyphen with a single instance
      .replace(/^-+|-+$/g, "")      # trim leading and trailing hyphens

  stripTags:(value)->
    value.replace /<(?:.|\n)*?>/gm, ''

  applyTextExpansions: (text)->
    return null unless text
    # @expandWwwDotDomains @expandUrls @expandUsernames @expandTags text
