vds_ios/VDS/Extensions/RawRepresentable.swift
Matt Bruce dffede1350 refactored Typography into new files
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
2023-07-21 10:44:24 -05:00

16 lines
345 B
Swift

//
// RawRepresentable.swift
// VDS
//
// Created by Matt Bruce on 7/21/23.
//
import Foundation
/// Helper method to check to see if you exist in a collection
extension RawRepresentable where Self.RawValue: Equatable {
public func isWithin(_ collection: [Self]) -> Bool {
(collection.first(where: {$0 == self}) != nil)
}
}