~askonomm/farm

aeeb5c5aae9749197296332a14673981c530592e — Asko N├Ámm a month ago c51c9c3 v1.0.2
Improvement in parsing files and downgrade swift reguirement
2 files changed, 4 insertions(+), 8 deletions(-)

M Package.swift
M Sources/Farm/Farm.swift
M Package.swift => Package.swift +1 -1
@@ 1,4 1,4 @@
// swift-tools-version:5.3
// swift-tools-version:5.2
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

M Sources/Farm/Farm.swift => Sources/Farm/Farm.swift +3 -7
@@ 165,12 165,8 @@ public struct Farm {
        let files = self.getFiles()
        let parsedFiles = self.parseFiles(files: files)
        
        for parsedFile in parsedFiles {
            if parsedFile.meta[key] != nil && parsedFile.meta[key] == value {
                return parsedFile
            }
        }
        
        return nil
        return parsedFiles.filter {
            $0.meta[key] != nil && $0.meta[key] == value
        }[0]
    }
}