Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SiestaUI library for Swift Package Manager #301

Merged
merged 1 commit into from
Mar 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ import PackageDescription
let package = Package(
name: "Siesta",
products: [
.library(name: "Siesta", targets: ["Siesta"])
.library(name: "Siesta", targets: ["Siesta"]),
.library(name: "SiestaUI", targets: ["SiestaUI"])
],
targets: [
.target(name: "Siesta")
.target(name: "Siesta"),
.target(
name: "SiestaUI",
dependencies: ["Siesta"]
)
]
)
19 changes: 19 additions & 0 deletions Source/SiestaUI/Support/Collection+Siesta.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// Collection+Siesta.swift
// Siesta
//
// Created by Paul on 2015/7/19.
// Copyright © 2016 Bust Out Solutions. All rights reserved.
//

import Foundation

extension Collection
{
// Just for readability
func any(match predicate: (Iterator.Element) -> Bool) -> Bool
{ return contains(where: predicate) }

func all(match predicate: (Iterator.Element) -> Bool) -> Bool
{ return !contains(where: { !predicate($0) }) }
}