EnumKit is a library that gives you the ability to simply access an enum associated value, without having to use pattern matching. It also offers many utilities available to other swift types, like updatability of an associated value and transformations.
EnumKit comes with an extension of Sequence to extend functions like compactMap, flatMap, filter to Sequences of enums cases.
All you need to do to get these features is to declare your enum conformant to the marker protocol CaseAccessible.
EnumKit
is a library that gives you the ability to simply access an enum associated value, without having to use pattern matching. It also offers many utilities available to other swift types, like updatability of an associated value and transformations.EnumKit
comes with an extension ofSequence
to extend functions likecompactMap
,flatMap
,filter
to Sequences of enums cases.All you need to do to get these features is to declare your enum conformant to the marker protocol
CaseAccessible
.For more please read our wiki.
Usage
Requirements
V 1.0.0
V 1.1.0
Installation
EnumKit offers cocoapods and swiftPM
Via Cocoapods
Replace
YOUR_TARGET_NAME
and then, in thePodfile
directory, type:via Swift Package Manager
Create a
Package.swift
file.External Resources