mutating func insert()

in Packages/ClientRuntime/Sources/Middleware/OrderedGroup.swift [26:38]


    mutating func insert(relativeTo: String, position: Position, ids: String...) {
        if ids.isEmpty {return}
        let indexOfRelativeItem = order.firstIndex(of: relativeTo)
        if let indexOfRelativeItem = indexOfRelativeItem {
            switch position {
            case .before:
                order.insert(contentsOf: ids, at: indexOfRelativeItem - 1)
            case .after:
                order.insert(contentsOf: ids, at: indexOfRelativeItem)
            }
    
        }
    }