mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 18:38:26 +00:00
@ -17,8 +17,10 @@ module Data.ItemIds exposing
|
||||
, fromSet
|
||||
, isEmpty
|
||||
, isMember
|
||||
, maybeOne
|
||||
, noChange
|
||||
, nonEmpty
|
||||
, one
|
||||
, select
|
||||
, selectAll
|
||||
, size
|
||||
@ -66,6 +68,16 @@ fromSet ids =
|
||||
ItemIds ids
|
||||
|
||||
|
||||
one : String -> ItemIds
|
||||
one id =
|
||||
ItemIds (Set.singleton id)
|
||||
|
||||
|
||||
maybeOne : Maybe String -> ItemIds
|
||||
maybeOne id =
|
||||
Maybe.map one id |> Maybe.withDefault empty
|
||||
|
||||
|
||||
union : ItemIds -> ItemIds -> ItemIds
|
||||
union (ItemIds ids1) (ItemIds ids2) =
|
||||
ItemIds (Set.union ids1 ids2)
|
||||
|
Reference in New Issue
Block a user