mirror of
				https://github.com/TheAnachronism/docspell.git
				synced 2025-11-03 18:00:11 +00:00 
			
		
		
		
	Starting with mail functionality
This commit is contained in:
		@@ -1,5 +1,6 @@
 | 
			
		||||
module Util.Maybe exposing
 | 
			
		||||
    ( isEmpty
 | 
			
		||||
    ( fromString
 | 
			
		||||
    , isEmpty
 | 
			
		||||
    , nonEmpty
 | 
			
		||||
    , or
 | 
			
		||||
    , withDefault
 | 
			
		||||
@@ -38,3 +39,16 @@ or listma =
 | 
			
		||||
 | 
			
		||||
                Nothing ->
 | 
			
		||||
                    or els
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
fromString : String -> Maybe String
 | 
			
		||||
fromString str =
 | 
			
		||||
    let
 | 
			
		||||
        s =
 | 
			
		||||
            String.trim str
 | 
			
		||||
    in
 | 
			
		||||
    if s == "" then
 | 
			
		||||
        Nothing
 | 
			
		||||
 | 
			
		||||
    else
 | 
			
		||||
        Just str
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user